summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord. johnson <fenris02@fedoraproject.org>2016-04-10 22:45:35 -0500
committerd. johnson <fenris02@fedoraproject.org>2016-04-10 22:45:35 -0500
commit73c63ad6369a4547eac2542347b3875aaffcb9b7 (patch)
tree3831f777b070c354662df324b7212546b345f629
parent589b16816d3797c47653c0149b09397f5a8560a3 (diff)
downloadcleanup-73c63ad6369a4547eac2542347b3875aaffcb9b7.tar.gz
cleanup-73c63ad6369a4547eac2542347b3875aaffcb9b7.tar.xz
cleanup-73c63ad6369a4547eac2542347b3875aaffcb9b7.zip
shellcheck / quotes
-rwxr-xr-xreset-selinux.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/reset-selinux.sh b/reset-selinux.sh
index a076eea..d4cec9e 100755
--- a/reset-selinux.sh
+++ b/reset-selinux.sh
@@ -6,7 +6,7 @@
DS=$(/bin/date +%Y%m%d)
LANG=C
-TMPDIR=$(/bin/mktemp -d ${TMPDIR:-/tmp}/${0##*/}-XXXXX.log)
+TMPDIR=$(/bin/mktemp -d "${TMPDIR:-/tmp}/${0##*/}-XXXXX.log")
[ -d "${TMPDIR}" ] || mkdir -p "${TMPDIR}"
if [ "$(/usr/bin/whoami)" != "root" ]; then
@@ -22,9 +22,9 @@ SELINUX=1
/usr/sbin/setenforce 0
[ -x /usr/sbin/semanage ] || yum install -y policycoreutils-python
-/usr/sbin/semanage -o ${TMPDIR}/SELINUX-CUSTOM-CONFIG_${DS}.txt
+/usr/sbin/semanage -o "${TMPDIR}/SELINUX-CUSTOM-CONFIG_${DS}.txt"
-/bin/mv /etc/selinux/targeted ${TMPDIR}/targeted.${DS}
+/bin/mv /etc/selinux/targeted "${TMPDIR}/targeted.${DS}"
/usr/bin/install -d -m 0755 -o root -g root /etc/selinux/targeted
/usr/bin/yum reinstall -y --noplugins --enablerepo=updates-testing \
libselinux{,-python,utils} \
@@ -32,7 +32,7 @@ SELINUX=1
selinux-policy{,-targeted} \
#
-/usr/sbin/semanage -i ${TMPDIR}/SELINUX-CUSTOM-CONFIG_${DS}.txt
+/usr/sbin/semanage -i "${TMPDIR}/SELINUX-CUSTOM-CONFIG_${DS}.txt"
/usr/sbin/semodule -B
@@ -42,7 +42,7 @@ time /sbin/fixfiles -R -a restore
echo "Remember to review /etc/selinux/semanage.conf for settings like handle-unknown=deny"
-/usr/sbin/setenforce $SELINUX
+/usr/sbin/setenforce "$SELINUX"
echo "You should reboot now."
#EOF