aboutsummaryrefslogtreecommitdiffstats
path: root/usr/captivatemtd_initramfs_files/init
diff options
context:
space:
mode:
Diffstat (limited to 'usr/captivatemtd_initramfs_files/init')
-rwxr-xr-xusr/captivatemtd_initramfs_files/init8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/captivatemtd_initramfs_files/init b/usr/captivatemtd_initramfs_files/init
index 5d0a655..feb03f6 100755
--- a/usr/captivatemtd_initramfs_files/init
+++ b/usr/captivatemtd_initramfs_files/init
@@ -17,11 +17,9 @@ load_offset=$boot_offset
load_len=$boot_len
busybox mount -t yaffs2 /dev/block/mtdblock2 /system
-busybox mount -t yaffs2 /dev/block/mtdblock3 /cache
-if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmdline ; then
+if busybox grep -q bootmode=2 /proc/cmdline ; then
# recovery boot
- busybox rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len
@@ -29,7 +27,6 @@ if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmd
busybox echo 0 > /sys/class/power_supply/battery/charging_mode_booting
elif ! busybox test -e /system/build.prop ; then
# emergency boot
- busybox umount /cache
erase_image cache
busybox mount -t yaffs2 /dev/block/mtdblock3 /cache
busybox mkdir /cache/recovery
@@ -42,6 +39,8 @@ elif ! busybox test -e /system/build.prop ; then
busybox echo "install_zip(\"`echo $UPDATE`\");" > /cache/recovery/extendedcommand
fi
+ busybox umount /cache
+
load_offset=$recovery_offset
load_len=$recovery_len
@@ -49,7 +48,6 @@ elif ! busybox test -e /system/build.prop ; then
busybox echo 0 > /sys/class/power_supply/battery/charging_mode_booting
fi
-busybox umount /cache
busybox umount /system
busybox umount /sdcard
busybox rmdir /sdcard