Revision 0e40454d
Added by Renato Botelho about 10 years ago
tmp/post_upgrade_command | ||
---|---|---|
31 | 31 |
|
32 | 32 |
# Fixup permissions on installed files |
33 | 33 |
if [ -f ${ROOT}etc/installed_filesystem.mtree ]; then |
34 |
/usr/sbin/mtree -U -e -q -f ${ROOT}etc/installed_filesystem.mtree -p ${ROOT} > /conf/mtree.log |
|
34 |
if [ -x "/tmp/mtree.old" ]; then |
|
35 |
MTREE_BIN=/tmp/mtree.old |
|
36 |
else |
|
37 |
MTREE_BIN=/usr/sbin/mtree |
|
38 |
fi |
|
39 |
${MTREE_BIN} -U -e -q -f ${ROOT}etc/installed_filesystem.mtree -p ${ROOT} > /conf/mtree.log |
|
35 | 40 |
fi |
36 | 41 |
|
37 | 42 |
# Make sure to preserve existing time zone |
tmp/pre_upgrade_command | ||
---|---|---|
26 | 26 |
cp -fp /bin/sh /tmp/sh.old |
27 | 27 |
kill ${PID} >/dev/null 2>&1 |
28 | 28 |
kill -9 ${PID} >/dev/null 2>&1 |
29 |
sed -i '' -e 's,sh /,/tmp/sh.old /,' /etc/rc.firmware |
|
29 |
sed -i '' -e 's,sh /,/tmp/sh.old /,' \ |
|
30 |
-e 's,/usr/sbin/mtree,/tmp/mtree.old,' /etc/rc.firmware |
|
30 | 31 |
# To avoid restarting rc.firmware twice because of #4328 |
31 | 32 |
sed -i '' -e '/^restore_chflags()/, /^}/ s/mtree *-PU/mtree -P/' /etc/rc.firmware |
32 | 33 |
/etc/rc.firmware pfSenseupgrade "${IMG}" |
Also available in: Unified diff
Keep a copy of old mtree binary during upgrade and use it to avoid crashing. Fixes #4563