commit: c8018d04a7b238b57a3d74a68e2af02af395f510
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Aug 13 20:26:37 2014 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Aug 13 20:26:37 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=c8018d04
tmpfiles: fix relabel to run restorecon before chown and chmod
---
sh/tmpfiles.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 8538545..42a3639 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -45,10 +45,10 @@ relabel() {
for path in ${paths}; do
if [ -e "$path" ]; then
+ [ -x /sbin/restorecon ] && dryrun_or_real restorecon
$CHOPTS "$path"
[ $uid != '-' ] && dryrun_or_real chown $CHOPTS "$uid"
"$path"
[ $gid != '-' ] && dryrun_or_real chgrp $CHOPTS "$gid"
"$path"
[ $mode != '-' ] && dryrun_or_real chmod $CHOPTS
"$mode" "$path"
- [ -x /sbin/restorecon ] && dryrun_or_real restorecon
$CHOPTS "$path"
fi
done
}