aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@openmesh.com>2018-10-01 11:48:04 +0200
committerMathias Kresin <dev@kresin.me>2018-10-07 16:42:05 +0200
commit234b893a18a034e4ce7a07ae6264525bad949e82 (patch)
tree4ec46d5c6ac4dc0f0f4fb0452bfb73c7965c30d5 /package/base-files/files/sbin
parentf3753a9ae0c725bd48b5d330d60f714325dc2d5d (diff)
downloadupstream-234b893a18a034e4ce7a07ae6264525bad949e82.tar.gz
upstream-234b893a18a034e4ce7a07ae6264525bad949e82.tar.bz2
upstream-234b893a18a034e4ce7a07ae6264525bad949e82.zip
base-files: Reintroduce sysupgrade_pre_upgrade hook
The sysupgrade_pre_upgrade hook was removed with 6a27c2f4b1a4 ("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: 6a27c2f4b1a4 ("base-files: drop fwtool_pre_upgrade") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index a378b02950..2f579fb874 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -137,6 +137,7 @@ add_overlayfiles() {
# hooks
sysupgrade_image_check="fwtool_check_image platform_check_image"
+sysupgrade_pre_upgrade=""
if [ $SAVE_OVERLAY = 1 ]; then
[ ! -d /overlay/upper/etc ] && {
@@ -263,6 +264,8 @@ else
rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap
fi
+run_hooks "" $sysupgrade_pre_upgrade
+
install_bin /sbin/upgraded
v "Commencing upgrade. Closing all shell sessions."