git.samba.org
/
obnox
/
vagrant
/
vagrant-gluster-samba-cluster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0bd4ff8
)
Make selinux script idempotent
author
Michael Adam
<obnox@samba.org>
Fri, 13 Mar 2015 00:34:16 +0000
(
01:34
+0100)
committer
Michael Adam
<obnox@samba.org>
Fri, 13 Mar 2015 00:34:16 +0000
(
01:34
+0100)
provision/shell/sys/selinux-off.sh
patch
|
blob
|
history
diff --git
a/provision/shell/sys/selinux-off.sh
b/provision/shell/sys/selinux-off.sh
index 321da5f77bf2c2f3deb68e130e32c6f4222755c1..ca5f377a86937a751780fb1c0ab14de0d26a351b 100755
(executable)
--- a/
provision/shell/sys/selinux-off.sh
+++ b/
provision/shell/sys/selinux-off.sh
@@
-4,7
+4,11
@@
set -e
-setenforce permissive
+GETENFORCE="$(getenforce 2> /dev/null)"
+
+[ "${GETENFORCE}" = "Disabled" ] || {
+ setenforce permissive
+}
BACKUP_SUFFIX=".orig.$(date +%Y%m%d-%H%M%S)"