Changeset 15683


Ignore:
Timestamp:
2009-05-07T15:51:45+02:00 (9 years ago)
Author:
jow
Message:

[sysupgrade] 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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/sbin/sysupgrade

    r15672 r15683  
    110110run_hooks "" $sysupgrade_pre_upgrade 
    111111 
    112 v "Switching to ramdisk..." 
    113 run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade' 
     112if [ -n "$(rootfs_type)" ]; then 
     113        v "Switching to ramdisk..." 
     114        run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade' 
     115else 
     116        do_upgrade 
     117fi 
Note: See TracChangeset for help on using the changeset viewer.