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,13 +82,16 @@ REBOOT=0
show_splash
mount_part "$boot" "/flash" "ro,noatime"
mount_part "$disk" "/storage" "rw,noatime"
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
update "System" "$IMAGE_SYSTEM" "/flash/$IMAGE_SYSTEM"
if test "$REBOOT" -eq 1; then
echo "System reboots now..." && \
/bin/busybox reboot
if [ -n "$disk" ]; then
mount_part "$disk" "/storage" "rw,noatime"
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
update "System" "$IMAGE_SYSTEM" "/flash/$IMAGE_SYSTEM"
if test "$REBOOT" -eq 1; then
echo "System reboots now..." && \
/bin/busybox reboot
fi
fi
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
@ -101,7 +104,10 @@ REBOOT=0
# move /flash and /storage to /sysroot
/bin/busybox mount --move /flash /sysroot/flash
/bin/busybox mount --move /storage /sysroot/storage
if [ -n "$disk" ]; then
/bin/busybox mount --move /storage /sysroot/storage
fi
# unmount all other filesystems
/bin/busybox umount /dev