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/post_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/post_upgrade_command')
-rwxr-xr-x | tmp/post_upgrade_command | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command index b42ad51..eea691f 100755 --- a/tmp/post_upgrade_command +++ b/tmp/post_upgrade_command @@ -31,7 +31,12 @@ rm -f /root/*.md5 >/dev/null 2>&1 # Fixup permissions on installed files if [ -f ${ROOT}etc/installed_filesystem.mtree ]; then - /usr/sbin/mtree -U -e -q -f ${ROOT}etc/installed_filesystem.mtree -p ${ROOT} > /conf/mtree.log + if [ -x "/tmp/mtree.old" ]; then + MTREE_BIN=/tmp/mtree.old + else + MTREE_BIN=/usr/sbin/mtree + fi + ${MTREE_BIN} -U -e -q -f ${ROOT}etc/installed_filesystem.mtree -p ${ROOT} > /conf/mtree.log fi # Make sure to preserve existing time zone |