summaryrefslogtreecommitdiffstats
path: root/tmp/post_upgrade_command
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-06-16 07:34:04 -0500
committerRenato Botelho <garga@FreeBSD.org>2015-06-16 07:34:13 -0500
commit0e40454d52e036d7dc9326ecd0ffeef10da445a5 (patch)
tree1ee6eb48e2a6df02b6fbc04ff4083f81c122103c /tmp/post_upgrade_command
parent0ab90dd0741782c0bf5ed3d2a13a8b6d977c8109 (diff)
downloadpfsense-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-xtmp/post_upgrade_command7
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
OpenPOWER on IntegriCloud