aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-08-15 18:55:01 +0200
committerMathias Kresin <dev@kresin.me>2018-08-16 21:20:57 +0200
commit56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec (patch)
tree4494f9c2e127cfb96b65b528027666a114950b77 /package/base-files
parent1ea1f3a223d7a56f96de00001f59b077a6c4d237 (diff)
downloadupstream-56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec.tar.gz
upstream-56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec.tar.bz2
upstream-56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec.zip
treewide: consolidate upgrade state set
Set the (sys)upgrade state when sourcing the stage2 script instead of setting the state for each target individual. This change fixes the, due to a missing state set, not working upgrade led on ath79 and apm821xx. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh5
-rwxr-xr-xpackage/base-files/files/lib/upgrade/stage21
2 files changed, 6 insertions, 0 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 0cbd2ab3a6..9e9144cba4 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -211,6 +211,11 @@ jffs2_copy_config() {
fi
}
+indicate_upgrade() {
+ . /etc/diag.sh
+ set_state upgrade
+}
+
# Flash firmware to MTD partition
#
# $(1): path to image
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index 3985d8fd7e..bdc12c7426 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -122,6 +122,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
echo
}
+indicate_upgrade
killall -9 telnetd
killall -9 dropbear