diff options
author | Renato Botelho <renato@netgate.com> | 2017-01-20 13:22:49 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-20 13:23:05 -0200 |
commit | 5d81840bd71325bd88f491edde91485f2214e047 (patch) | |
tree | 485c9503cfc12136cdb74a8db620f36256ac046f /src/etc/pfSense-rc | |
parent | c744b0de92b17ced8238723042a314db45b76c53 (diff) | |
download | pfsense-5d81840bd71325bd88f491edde91485f2214e047.zip pfsense-5d81840bd71325bd88f491edde91485f2214e047.tar.gz |
Fix #7086: Copy files over from /var before umount it and move to MFS
Diffstat (limited to 'src/etc/pfSense-rc')
-rwxr-xr-x | src/etc/pfSense-rc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/etc/pfSense-rc b/src/etc/pfSense-rc index 19b8928..16834c3 100755 --- a/src/etc/pfSense-rc +++ b/src/etc/pfSense-rc @@ -139,17 +139,6 @@ fi USE_MFS_TMPVAR=$(/usr/local/sbin/read_xml_tag.sh boolean system/use_mfs_tmpvar) -# Mount /var and /tmp on ZFS filesystems when it's necessary -if [ -n "${USE_ZFS}" -a "${USE_MFS_TMPVAR}" != "true" ]; then - zfs list -H -o name,mountpoint,canmount | - while read volume mountpoint canmount; do - [ "${mountpoint}" != "/var" -a "${mountpoint}" != "/tmp" ] \ - && continue - - /sbin/zfs mount ${volume} - done -fi - unset MOVE_PKG_DATA # If use MFS var is disabled, move files back to place if [ "${USE_MFS_TMPVAR}" != "true" -a -f /root/var/db/pkg/local.sqlite ]; then @@ -168,6 +157,17 @@ elif [ "${USE_MFS_TMPVAR}" = "true" -a -f /var/db/pkg/local.sqlite ]; then mv -f /var/cache/pkg /root/var/cache fi +# Mount /var and /tmp on ZFS filesystems when it's necessary +if [ -n "${USE_ZFS}" -a "${USE_MFS_TMPVAR}" = "true" ]; then + zfs list -H -o name,mountpoint | + while read volume mountpoint; do + [ "${mountpoint}" != "/var" -a "${mountpoint}" != "/tmp" ] \ + && continue + + /sbin/zfs umount ${volume} + done +fi + if [ "${USE_MFS_TMPVAR}" = "true" ]; then /etc/rc.embedded fi |