2
0
forked from Ivasoft/openwrt

base-files: move stage2 upgrade to separated file

do_upgrade_stage2() isn't really any common code. It isn't used anywhere
except for /sbin/sysupgrade that passes it to the stage2.

Moving its code to separated file also simplifies COMMAND variable.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki
2019-07-03 09:51:49 +02:00
parent 087e14ab59
commit f7edd94a65
4 changed files with 27 additions and 24 deletions

View File

@@ -363,7 +363,7 @@ fi
install_bin /sbin/upgraded
v "Commencing upgrade. Closing all shell sessions."
COMMAND='. /lib/functions.sh; include /lib/upgrade; do_upgrade_stage2'
COMMAND='/lib/upgrade/do_stage2'
if [ -n "$FAILSAFE" ]; then
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade