mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
[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@silverton.gr> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15683 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
df2bb6497f
commit
bbc7a4c8c7
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user