From 41cc59dac31ceb283fd22e182225a775668c22f5 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 7 Jul 2010 23:48:38 +0200 Subject: [PATCH] busybox-initramfs: only mount /storage (and do an upgrade) if 'disk=' is specified in kernel config Signed-off-by: Stephan Raue --- .../sysutils/busybox-initramfs/scripts/init | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/sysutils/busybox-initramfs/scripts/init b/packages/sysutils/busybox-initramfs/scripts/init index a35e67807c..63f245657c 100755 --- a/packages/sysutils/busybox-initramfs/scripts/init +++ b/packages/sysutils/busybox-initramfs/scripts/init @@ -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