aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsh/tmpfiles.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 22d5f1f5..b59f4cb1 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -54,17 +54,19 @@ relabel() {
_b() {
# Create a block device node if it doesn't exist yet
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
- [ ! -e "$path" ] && \
- dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} && \
+ if [ ! -e "$path" ]; then
+ dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
dryrun_or_real chown $uid:$gid $path
+ fi
}
_c() {
# Create a character device node if it doesn't exist yet
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
- [ ! -e "$path" ] && \
- dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} && \
+ if [ ! -e "$path" ]; then
+ dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
dryrun_or_real chown $uid:$gid $path
+ fi
}