aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorDirk Sondermann <ds-gentoo@dyximaq.de>2013-07-27 10:53:32 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-07-27 10:53:32 -0500
commite90dcf39dd3f3658a7d9804e73d0442ae6c7935c (patch)
tree18470988945562ff7bc974136840be24ea6674bf /sh
parente942e88b8cf37cd7dc292b7dbcfa567114bdb28e (diff)
tmpfiles: do not signal an error if device nodes already exist
X-Gentoo-Bug: 478336 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336
Diffstat (limited to 'sh')
-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
}