diff options
author | Koen Kooi <koen@openembedded.org> | 2006-03-02 17:54:35 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-03-02 17:54:35 +0000 |
commit | 40ce95ca64d662c16cec3d1efabc966dda5a2610 (patch) | |
tree | c5687492fbbc7f7e46b8db8448b1da640fef9955 /packages/altboot/files/altboot.func | |
parent | 858ca7bc53e7c03eac036217486e87e36eb1e3e6 (diff) | |
parent | 966f3a94af2c83ffd2c634171fbe04917731b6f9 (diff) |
explicit_merge of '601faaded8a6427e29dc8dc43433fe9be662c96c'
and 'a67386ccbaf4538441ab5d8769e018207ab0c744'
using ancestor '9c1b32d8825be71ddfdcbe3ddfa31b4cc8bb2aa0'
to branch 'org.openembedded.dev'
Diffstat (limited to 'packages/altboot/files/altboot.func')
-rw-r--r-- | packages/altboot/files/altboot.func | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index 6dfad21374..c6af50a008 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -65,7 +65,7 @@ pivot_realfs() { test -z "$2" && RL="5" || RL="$2" mkdir -p $1/media/ROM || die "mkdir -p $1/media/ROM failed" - mount -o remount,ro / + mount -o remount,ro / >/dev/null 2>&1 do_pivot "$1" "$RL" } @@ -119,19 +119,17 @@ pivot_image() { echo "Setting up loopback (/dev/loop0) for $IMAGE_NAME" losetup /dev/loop0 $1/$IMAGE_PATH/$IMAGE_NAME || die "losetup /dev/loop0 $1/$IMAGE_PATH/$IMAGE_NAME failed!" check_fs /dev/loop0 $IMAGE_TYPE - - losetup -d /dev/loop0 + echo -e "\n* * * Booting rootfs image * * *\n" - # Busybox's "mount" doesn't seem to like "-o loop" for some reason # It works on collie and b0rks on poodle. if [ "$IMAGE_TYPE" = "" ]; then IMAGE_TYPE="auto" fi # If mount fails it has the tendency to spew out a _lot_ of error messages. - # We direct the output to /dev/null so the user can see which step actually failed. - mount -o loop -t $IMAGE_TYPE $1/$IMAGE_PATH/$IMAGE_NAME /media/image >/dev/null 2>&1 || die "mount -t $IMAGE_TYPE /dev/loop0 /media/image failed!" + # We direct the output to /dev/null so the user can see which step actually failed. + mount /dev/loop0 -t $IMAGE_TYPE /media/image >/dev/null 2>&1 || die "mount -t $IMAGE_TYPE /dev/loop0 /media/image failed!" mkdir -p /media/image/media/ROM || die "mkdir -p /media/image/media/ROM failed" @@ -280,7 +278,7 @@ check_fs() { elif [ -e /sbin/e2fsck ]; then FSCK="/sbin/e2fsck" fi - FSCK="$FSCK -p" + test -n "$FSCK" && FSCK="$FSCK -p" ;; vfat) if [ -e /sbin/dosfsck ]; then @@ -310,11 +308,11 @@ init_rootfs(){ fi echo -n "Generating device files..." >/dev/tty0 - /etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED" + /etc/init.d/devices start && echo ok >/dev/tty0 || die "FAILED" } mount_sd(){ - if mount | grep -q "/media/card " + if mount | grep -q "/media/card" then echo "Note: /media/card is already mounted" else @@ -353,13 +351,15 @@ mount_cf(){ if mount | grep -q "/media/cf " then echo "Note: /media/cf is already mounted" - else - /etc/init.d/pcmcia start || die "/etc/init.d/pcmcia/start failed!" + else + /etc/init.d/pcmcia status | grep -q running || /etc/init.d/pcmcia start && echo "Note: cardmgr is already active" echo "" # Give the SD and CF mounting some time. This is a must for SD sleep 2 + + mount | grep -q "/media/cf " || mount /media/cf fi } @@ -369,7 +369,7 @@ mount_home(){ echo "Note: /home is already mounted" else - if ( grep -q "/home " /etc/fstab ) + if ( cat /etc/fstab | grep -v "^#" | grep "/home " ) then echo "Mounting /home" home_fstab="`grep "/home " /etc/fstab`" |