Replace touch by :, add "|| :"

touch is from coreutils, and : is built into the shell.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-02-22 13:59:43 +01:00
parent a88494686e
commit 273dc0fda0
1 changed files with 2 additions and 3 deletions

View File

@ -159,7 +159,6 @@ Obsoletes: systemd-compat-libs < 230
Obsoletes: nss-myhostname < 0.4
Provides: nss-myhostname = 0.4
Provides: nss-myhostname%{_isa} = 0.4
Requires(post): coreutils
Requires(post): sed
Requires(post): grep
Requires(post): /usr/bin/getent
@ -601,12 +600,12 @@ export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
if getent passwd nfsnobody &>/dev/null; then
test -f /etc/systemd/dont-synthesize-nobody || {
echo 'Detected system with nfsnobody defined, creating /etc/systemd/dont-synthesize-nobody'
touch /etc/systemd/dont-synthesize-nobody
: >/etc/systemd/dont-synthesize-nobody || :
}
elif getent passwd nobody 2>/dev/null | grep -v 'nobody:[x*]:65534:65534:.*:/:/sbin/nologin' &>/dev/null; then
test -f /etc/systemd/dont-synthesize-nobody || {
echo 'Detected system with incompatible nobody defined, creating /etc/systemd/dont-synthesize-nobody'
touch /etc/systemd/dont-synthesize-nobody
: >/etc/systemd/dont-synthesize-nobody || :
}
fi