aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-07 13:51:45 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-07 13:51:45 +0000
commit7da25b844cdf1944755a2ceb95543184776fa8e5 (patch)
treea06d7664fa93a88f4a8bbb2679fdb818997345ae /package/base-files/files/sbin
parent9209af2c00a71d3b1fe1bf427986a64f259ea95e (diff)
downloadupstream-7da25b844cdf1944755a2ceb95543184776fa8e5.tar.gz
upstream-7da25b844cdf1944755a2ceb95543184776fa8e5.tar.bz2
upstream-7da25b844cdf1944755a2ceb95543184776fa8e5.zip
Don't try to pivot to new ramfs if already running on one This patch allows the sysupgrade script to continue with the upgrade if openwrt is already running on a ramfs. This allows the use of the sysupgrade script as an _installer_ when running from an iso image. A user could boot the system from a bootable cd and invoke sysupgrade -n <URL> to write an image to the hard disk or CF.
Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> SVN-Revision: 15683
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade8
1 files changed, 6 insertions, 2 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 83cc95682f..139135e8f7 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -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