Просмотр исходного кода

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 <[email protected]>

SVN-Revision: 44941
Felix Fietkau 11 лет назад
Родитель
Сommit
bc1fc688af

+ 1 - 0
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 ] && {

+ 1 - 4
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
 	}
 }