aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2014-08-13 15:26:37 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-08-13 15:26:37 -0500
commitc8018d04a7b238b57a3d74a68e2af02af395f510 (patch)
tree782a31b6d8b446213b647c7de160daa58b74f7c6
parent6f080e9c1a2a9b9c308cdc03f9cf782c4ce4d440 (diff)
tmpfiles: fix relabel to run restorecon before chown and chmod
-rwxr-xr-xsh/tmpfiles.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 85385453..42a36392 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
}