aboutsummaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-01-07 12:22:03 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-01-07 12:24:34 +0700
commit358806f65eb49a8e8415c1c5f225942afdc4ddd0 (patch)
tree54f3a58f19a4a84e43aec2154f8fd474509d9a25 /usr
parent10fd786bd425a310b63eb6be4bb8ccf9f7c92f39 (diff)
downloadkernel_samsung_aries-358806f65eb49a8e8415c1c5f225942afdc4ddd0.zip
kernel_samsung_aries-358806f65eb49a8e8415c1c5f225942afdc4ddd0.tar.gz
kernel_samsung_aries-358806f65eb49a8e8415c1c5f225942afdc4ddd0.tar.bz2
aries: Bring back /cache/.startrecovery for compatibility
ROM Manager hardcoded the usage of /cache/.startrecovery, so bring that back for compatibility. (Updating ROM Manager would break support for old versions.)
Diffstat (limited to 'usr')
-rwxr-xr-xusr/captivatemtd_initramfs_files/init8
-rwxr-xr-xusr/fascinatemtd_initramfs_files/init9
-rwxr-xr-xusr/galaxysbmtd_initramfs_files/init8
-rwxr-xr-xusr/galaxysmtd_initramfs_files/init8
-rwxr-xr-xusr/vibrantmtd_initramfs_files/init8
5 files changed, 26 insertions, 15 deletions
diff --git a/usr/captivatemtd_initramfs_files/init b/usr/captivatemtd_initramfs_files/init
index feb03f6..5d0a655 100755
--- a/usr/captivatemtd_initramfs_files/init
+++ b/usr/captivatemtd_initramfs_files/init
@@ -17,9 +17,11 @@ 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 grep -q bootmode=2 /proc/cmdline ; then
+if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmdline ; then
# recovery boot
+ busybox rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len
@@ -27,6 +29,7 @@ if busybox grep -q bootmode=2 /proc/cmdline ; then
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
@@ -39,8 +42,6 @@ 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
@@ -48,6 +49,7 @@ 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
diff --git a/usr/fascinatemtd_initramfs_files/init b/usr/fascinatemtd_initramfs_files/init
index 4d35c3e..ae94eab 100755
--- a/usr/fascinatemtd_initramfs_files/init
+++ b/usr/fascinatemtd_initramfs_files/init
@@ -17,9 +17,12 @@ 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 grep -q bootmode=2 /proc/cmdline ; then
+if busybox test -e /cache/.startrecovery || \
+ busybox grep -q bootmode=2 /proc/cmdline ; then
# recovery boot
+ busybox rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len
@@ -28,6 +31,7 @@ if busybox grep -q bootmode=2 /proc/cmdline ; then
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
@@ -40,8 +44,6 @@ 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,6 +51,7 @@ 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
diff --git a/usr/galaxysbmtd_initramfs_files/init b/usr/galaxysbmtd_initramfs_files/init
index feb03f6..5d0a655 100755
--- a/usr/galaxysbmtd_initramfs_files/init
+++ b/usr/galaxysbmtd_initramfs_files/init
@@ -17,9 +17,11 @@ 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 grep -q bootmode=2 /proc/cmdline ; then
+if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmdline ; then
# recovery boot
+ busybox rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len
@@ -27,6 +29,7 @@ if busybox grep -q bootmode=2 /proc/cmdline ; then
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
@@ -39,8 +42,6 @@ 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
@@ -48,6 +49,7 @@ 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
diff --git a/usr/galaxysmtd_initramfs_files/init b/usr/galaxysmtd_initramfs_files/init
index feb03f6..5d0a655 100755
--- a/usr/galaxysmtd_initramfs_files/init
+++ b/usr/galaxysmtd_initramfs_files/init
@@ -17,9 +17,11 @@ 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 grep -q bootmode=2 /proc/cmdline ; then
+if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmdline ; then
# recovery boot
+ busybox rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len
@@ -27,6 +29,7 @@ if busybox grep -q bootmode=2 /proc/cmdline ; then
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
@@ -39,8 +42,6 @@ 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
@@ -48,6 +49,7 @@ 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
diff --git a/usr/vibrantmtd_initramfs_files/init b/usr/vibrantmtd_initramfs_files/init
index feb03f6..5d0a655 100755
--- a/usr/vibrantmtd_initramfs_files/init
+++ b/usr/vibrantmtd_initramfs_files/init
@@ -17,9 +17,11 @@ 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 grep -q bootmode=2 /proc/cmdline ; then
+if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmdline ; then
# recovery boot
+ busybox rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len
@@ -27,6 +29,7 @@ if busybox grep -q bootmode=2 /proc/cmdline ; then
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
@@ -39,8 +42,6 @@ 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
@@ -48,6 +49,7 @@ 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