Skip to content

Commit

Permalink
Activate sync for the root slice in fstab during upgrade. Ticket #4523
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-p committed Jun 10, 2015
1 parent 2895e60 commit ed97bf7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tmp/pre_upgrade_command
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit ed97bf7

Please sign in to comment.