summaryrefslogtreecommitdiffstats
path: root/tmp/post_upgrade_command
diff options
context:
space:
mode:
Diffstat (limited to 'tmp/post_upgrade_command')
-rwxr-xr-xtmp/post_upgrade_command11
1 files changed, 9 insertions, 2 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command
index de4c286..b42ad51 100755
--- a/tmp/post_upgrade_command
+++ b/tmp/post_upgrade_command
@@ -39,14 +39,21 @@ if [ "${PFSENSETYPE}" = "nanobsd" -a -f /etc/localtime ]; then
/bin/cp -p /etc/localtime ${ROOT}etc/localtime 2>/dev/null
fi
+# Files may contain spaces
+oIFS=${IFS}
+IFS="
+"
# Obsolete files - nanobsd doesn't need it since a new image is installed
# on the other partition
if [ "${PFSENSETYPE}" != "nanobsd" -a -f /etc/pfSense.obsoletedfiles ]; then
for f in $(cat /etc/pfSense.obsoletedfiles); do
if [ -n "${f}" -a -f "${f}" ]; then
- rm -f ${f}
+ rm -f "${f}"
elif [ -n "${f}" -a -d "${f}" ]; then
- rm -rf ${f}
+ rm -rf "${f}"
fi
done
fi
+
+# Restore IFS
+IFS=${oIFS}
OpenPOWER on IntegriCloud