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
master
Felix Fietkau 2015-03-22 15:11:20 +00:00
parent 1645c84c49
commit 0940db5e2e
2 changed files with 2 additions and 4 deletions

View File

@ -4,6 +4,7 @@
START=95 START=95
boot() { boot() {
[ -d /tmp/root ] && mount_root done [ -d /tmp/root ] && mount_root done
rm -f /sysupgrade.tgz
# process user commands # process user commands
[ -f /etc/rc.local ] && { [ -f /etc/rc.local ] && {

View File

@ -8,10 +8,7 @@ do_mount_root() {
[ -f /sysupgrade.tgz ] && { [ -f /sysupgrade.tgz ] && {
echo "- config restore -" echo "- config restore -"
cd / cd /
mv sysupgrade.tgz /tmp tar xzf /sysupgrade.tgz
tar xzf /tmp/sysupgrade.tgz
rm -f /tmp/sysupgrade.tgz
sync
} }
} }