diff options
author | Matthias Hentges <oe@hentges.net> | 2006-02-23 03:08:49 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-02-23 03:08:49 +0000 |
commit | f8955e0dc7898ad33000cd50f92b3ea15e84169e (patch) | |
tree | 69f1c3f733a7b7e6d4f59e03a1f12bc0698f7a34 /packages/altboot/files | |
parent | f8d1004925f54ddab0e3385463c0725f47f50c72 (diff) |
altboot: More kernel 2.4 fixes
Diffstat (limited to 'packages/altboot/files')
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/70-install-tgz | 26 | ||||
-rw-r--r-- | packages/altboot/files/altboot.func | 8 | ||||
-rw-r--r-- | packages/altboot/files/init.altboot | 1 |
3 files changed, 27 insertions, 8 deletions
diff --git a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz index 2ff380418d..c525b9154c 100644 --- a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz +++ b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz @@ -51,8 +51,18 @@ run_module(){ read junk case "$junk" in - 1) rootfs_target="/media/card"; break ;; - 2) rootfs_target="/media/cf" ; break ;; + 1) if (mount | grep -q "/media/card ") + then + rootfs_target="/media/card"; break + else + echo -e "\nInstallation target [/media/card] not mounted\n" + fi ;; + 2) if (mount | grep -q "/media/cf ") + then + rootfs_target="/media/cf"; break + else + echo -e "\nInstallation target [/media/cf] not mounted\n" + fi ;; esac done @@ -68,7 +78,13 @@ run_module(){ read junk case "$junk" in - 1) rootfs_type="image"; break ;; + 1) if test -x /sbin/mkfs.ext2 + then + rootfs_type="image" + break + else + echo -e "\nNOTE: mkfs.ext2 (from e2fsprogs-mke2fs) not found, loop-images not supported\n" + fi ;; 2) rootfs_type="direct" ; break ;; esac done @@ -95,6 +111,8 @@ clear_directories(){ install_rootfs_direct(){ + mount | grep -q "$1 " || die "Installation target [$1] not mounted" + echo -e "Do you want to remove existing directories from [$1]\n before installing the new rootfs?" echo "" @@ -152,7 +170,7 @@ install_rootfs_image(){ while true do - echo -n "Overwrite? [N|y] " + echo -n "Overwrite? [y|N] " read junk2 case "$junk2" in diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index 9b570111e8..ec3479257e 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -278,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 @@ -351,8 +351,8 @@ 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 already active" echo "" @@ -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`" diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index 2ba6f654b5..871ae82d71 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -278,6 +278,7 @@ if test "`runlevel`" != "unknown" -a "$1" != "-force" then echo "altboot: Using real init [$REAL_INIT] [$*] *" >/dev/tty1 exec $REAL_INIT $* +# exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 exit 0 else # Boot original init if altboot is turned off |