1 |
commit: e90dcf39dd3f3658a7d9804e73d0442ae6c7935c |
2 |
Author: Dirk Sondermann <ds-gentoo <AT> dyximaq <DOT> de> |
3 |
AuthorDate: Sat Jul 27 15:53:32 2013 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 27 15:53:32 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=e90dcf39 |
7 |
|
8 |
tmpfiles: do not signal an error if device nodes already exist |
9 |
|
10 |
X-Gentoo-Bug: 478336 |
11 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336 |
12 |
|
13 |
--- |
14 |
sh/tmpfiles.sh.in | 10 ++++++---- |
15 |
1 file changed, 6 insertions(+), 4 deletions(-) |
16 |
|
17 |
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in |
18 |
index 22d5f1f..b59f4cb 100755 |
19 |
--- a/sh/tmpfiles.sh.in |
20 |
+++ b/sh/tmpfiles.sh.in |
21 |
@@ -54,17 +54,19 @@ relabel() { |
22 |
_b() { |
23 |
# Create a block device node if it doesn't exist yet |
24 |
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 |
25 |
- [ ! -e "$path" ] && \ |
26 |
- dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} && \ |
27 |
+ if [ ! -e "$path" ]; then |
28 |
+ dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} |
29 |
dryrun_or_real chown $uid:$gid $path |
30 |
+ fi |
31 |
} |
32 |
|
33 |
_c() { |
34 |
# Create a character device node if it doesn't exist yet |
35 |
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 |
36 |
- [ ! -e "$path" ] && \ |
37 |
- dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} && \ |
38 |
+ if [ ! -e "$path" ]; then |
39 |
+ dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} |
40 |
dryrun_or_real chown $uid:$gid $path |
41 |
+ fi |
42 |
} |