diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-06-16 07:34:04 -0500 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-06-16 07:34:13 -0500 |
commit | 0e40454d52e036d7dc9326ecd0ffeef10da445a5 (patch) | |
tree | 1ee6eb48e2a6df02b6fbc04ff4083f81c122103c /tmp/pre_upgrade_command | |
parent | 0ab90dd0741782c0bf5ed3d2a13a8b6d977c8109 (diff) | |
download | pfsense-0e40454d52e036d7dc9326ecd0ffeef10da445a5.zip pfsense-0e40454d52e036d7dc9326ecd0ffeef10da445a5.tar.gz |
Keep a copy of old mtree binary during upgrade and use it to avoid crashing. Fixes #4563
Diffstat (limited to 'tmp/pre_upgrade_command')
-rw-r--r-- | tmp/pre_upgrade_command | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tmp/pre_upgrade_command b/tmp/pre_upgrade_command index 435b3dc..5bfd891 100644 --- a/tmp/pre_upgrade_command +++ b/tmp/pre_upgrade_command @@ -26,7 +26,8 @@ if [ ${PRIOR_VERSION} -le 8 ] && grep -q 'sh /etc/rc.reboot' /etc/rc.firmware; t cp -fp /bin/sh /tmp/sh.old kill ${PID} >/dev/null 2>&1 kill -9 ${PID} >/dev/null 2>&1 - sed -i '' -e 's,sh /,/tmp/sh.old /,' /etc/rc.firmware + sed -i '' -e 's,sh /,/tmp/sh.old /,' \ + -e 's,/usr/sbin/mtree,/tmp/mtree.old,' /etc/rc.firmware # To avoid restarting rc.firmware twice because of #4328 sed -i '' -e '/^restore_chflags()/, /^}/ s/mtree *-PU/mtree -P/' /etc/rc.firmware /etc/rc.firmware pfSenseupgrade "${IMG}" |