[sysupgrade] Don't try to pivot to new ramfs if already running on one
[openwrt.git] / package / base-files / files / sbin / sysupgrade
index 83cc956..139135e 100755 (executable)
@@ -109,5 +109,9 @@ else
 fi
 run_hooks "" $sysupgrade_pre_upgrade
 
-v "Switching to ramdisk..."
-run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
+if [ -n "$(rootfs_type)" ]; then
+       v "Switching to ramdisk..."
+       run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
+else
+       do_upgrade
+fi
\ No newline at end of file