summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-06-10 12:49:28 -0400
committerjim-p <jimp@pfsense.org>2015-06-10 12:49:28 -0400
commited97bf788e77adace331d32112cb5665195d9b23 (patch)
tree2086321ef4565d85c08159204740ced244a67250 /tmp
parent2895e60696eda06df7238a942123a006e89608ec (diff)
downloadpfsense-ed97bf788e77adace331d32112cb5665195d9b23.zip
pfsense-ed97bf788e77adace331d32112cb5665195d9b23.tar.gz
Activate sync for the root slice in fstab during upgrade. Ticket #4523
Diffstat (limited to 'tmp')
-rw-r--r--tmp/pre_upgrade_command6
1 files changed, 6 insertions, 0 deletions
diff --git a/tmp/pre_upgrade_command b/tmp/pre_upgrade_command
index 2bcdfb2..5547b70 100644
--- a/tmp/pre_upgrade_command
+++ b/tmp/pre_upgrade_command
@@ -6,6 +6,12 @@
PRIOR_VERSION=`uname -r | cut -d'.' -f1`
echo $PRIOR_VERSION > /tmp/pre_upgrade_version
+# Activate sync on root filesystem. See ticket #4523
+# Back up original fstab
+/bin/cp /etc/fstab /etc/fstab.orig
+# Activate sync on the root slice only. This will not match NanoBSD since it already has sync,noatime
+/usr/bin/sed -i '' 's/^\(\/.*[[:space:]]*\/[[:space:]]*ufs[[:space:]]*\)rw\([[:space:]]*[[:digit:]][[:space:]]*[[:digit:]]\)$/\1rw,sync\2/' /etc/fstab
+
# Hack to workaround ticket #3749
if [ "${PRIOR_VERSION}" = "8" ] && grep -q 'sh /etc/rc.reboot' /etc/rc.firmware; then
PROC=$(ps axwww | grep '/etc/rc.firmware *pfSenseupgrade')
OpenPOWER on IntegriCloud