sysupgrade: do not kill any processes in failsafe
[openwrt.git] / package / base-files / files / sbin / sysupgrade
index 56e9a92..e6588bf 100755 (executable)
@@ -210,9 +210,11 @@ run_hooks "" $sysupgrade_pre_upgrade
 ubus call system upgrade
 touch /tmp/sysupgrade
 
 ubus call system upgrade
 touch /tmp/sysupgrade
 
-kill_remaining TERM
-sleep 3
-kill_remaining KILL
+if [ ! -f /tmp/failsafe ] ; then
+       kill_remaining TERM
+       sleep 3
+       kill_remaining KILL
+fi
 
 if [ -n "$(rootfs_type)" ]; then
        v "Switching to ramdisk..."
 
 if [ -n "$(rootfs_type)" ]; then
        v "Switching to ramdisk..."