aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-22 15:11:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-22 15:11:20 +0000
commit0940db5e2e3b0c227ee79200b99fe31db0ebc452 (patch)
tree51965f306ba9a1fb02b0dce62b203391a5de7f40 /package
parent1645c84c49bdcfb775bcd995d6142cc8a83cffd6 (diff)
downloadupstream-0940db5e2e3b0c227ee79200b99fe31db0ebc452.tar.gz
upstream-0940db5e2e3b0c227ee79200b99fe31db0ebc452.tar.bz2
upstream-0940db5e2e3b0c227ee79200b99fe31db0ebc452.zip
base-files: keep sysupgrade.tgz until /etc/init.d/done has been called
This makes interrupted boots after sysupgrade more reliable Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44941 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/etc/init.d/done1
-rw-r--r--package/base-files/files/lib/preinit/80_mount_root5
2 files changed, 2 insertions, 4 deletions
diff --git a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done
index b254aff315..ed75e4022f 100755
--- a/package/base-files/files/etc/init.d/done
+++ b/package/base-files/files/etc/init.d/done
@@ -4,6 +4,7 @@
START=95
boot() {
[ -d /tmp/root ] && mount_root done
+ rm -f /sysupgrade.tgz
# process user commands
[ -f /etc/rc.local ] && {
diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root
index 0292d82d4a..f3fe788e19 100644
--- a/package/base-files/files/lib/preinit/80_mount_root
+++ b/package/base-files/files/lib/preinit/80_mount_root
@@ -8,10 +8,7 @@ do_mount_root() {
[ -f /sysupgrade.tgz ] && {
echo "- config restore -"
cd /
- mv sysupgrade.tgz /tmp
- tar xzf /tmp/sysupgrade.tgz
- rm -f /tmp/sysupgrade.tgz
- sync
+ tar xzf /sysupgrade.tgz
}
}