busybox-initramfs: only mount /storage (and do an upgrade) if 'disk=' is specified in kernel config

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-07-07 23:48:38 +02:00
parent 84e8324a43
commit 41cc59dac3

View File

@ -82,6 +82,8 @@ REBOOT=0
show_splash
mount_part "$boot" "/flash" "ro,noatime"
if [ -n "$disk" ]; then
mount_part "$disk" "/storage" "rw,noatime"
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
update "System" "$IMAGE_SYSTEM" "/flash/$IMAGE_SYSTEM"
@ -90,6 +92,7 @@ REBOOT=0
echo "System reboots now..." && \
/bin/busybox reboot
fi
fi
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "loop"
@ -101,7 +104,10 @@ REBOOT=0
# move /flash and /storage to /sysroot
/bin/busybox mount --move /flash /sysroot/flash
if [ -n "$disk" ]; then
/bin/busybox mount --move /storage /sysroot/storage
fi
# unmount all other filesystems
/bin/busybox umount /dev