base-files: Reintroduce sysupgrade_pre_upgrade hook
authorSven Eckelmann <sven.eckelmann@openmesh.com>
Mon, 1 Oct 2018 09:48:04 +0000 (11:48 +0200)
committerMathias Kresin <dev@kresin.me>
Sun, 7 Oct 2018 14:42:05 +0000 (16:42 +0200)
commit234b893a18a034e4ce7a07ae6264525bad949e82
tree4ec46d5c6ac4dc0f0f4fb0452bfb73c7965c30d5
parentf3753a9ae0c725bd48b5d330d60f714325dc2d5d
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>
package/base-files/files/sbin/sysupgrade