base-files: Reintroduce sysupgrade_pre_upgrade hook
The sysupgrade_pre_upgrade hook was removed with6a27c2f4b1
("base-files: drop fwtool_pre_upgrade") while there were still scripts using it: * target/linux/ar71xx/base-files/lib/upgrade/allnet.sh * target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh * target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh Not running the hooks can either prevent a successful upgrade or brick the device because the fw_setenv program cannot be started correctly. Fixes:6a27c2f4b1
("base-files: drop fwtool_pre_upgrade") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
This commit is contained in:
parent
f3753a9ae0
commit
234b893a18
1 changed files with 3 additions and 0 deletions
|
@ -137,6 +137,7 @@ add_overlayfiles() {
|
||||||
|
|
||||||
# hooks
|
# hooks
|
||||||
sysupgrade_image_check="fwtool_check_image platform_check_image"
|
sysupgrade_image_check="fwtool_check_image platform_check_image"
|
||||||
|
sysupgrade_pre_upgrade=""
|
||||||
|
|
||||||
if [ $SAVE_OVERLAY = 1 ]; then
|
if [ $SAVE_OVERLAY = 1 ]; then
|
||||||
[ ! -d /overlay/upper/etc ] && {
|
[ ! -d /overlay/upper/etc ] && {
|
||||||
|
@ -263,6 +264,8 @@ else
|
||||||
rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap
|
rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
run_hooks "" $sysupgrade_pre_upgrade
|
||||||
|
|
||||||
install_bin /sbin/upgraded
|
install_bin /sbin/upgraded
|
||||||
v "Commencing upgrade. Closing all shell sessions."
|
v "Commencing upgrade. Closing all shell sessions."
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue