>> 3.1.0e. Fixes #73356, #74758, #77277, #77363, #78636.
authorTim Yamin <plasmaroo@gentoo.org>
Sat, 22 Jan 2005 20:00:20 +0000 (20:00 +0000)
committerTim Yamin <plasmaroo@gentoo.org>
Sat, 22 Jan 2005 20:00:20 +0000 (20:00 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@159 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_bootloader.sh
generic/initrd.scripts
generic/linuxrc
genkernel

index e74d30891189d53685034393f1bea2d847b531d3..65c122519209d8c59ec7276306b4a9e087ba6648 100644 (file)
@@ -17,7 +17,7 @@ set_grub_bootloader() {
 
        # Extract block device information from /etc/fstab
        local GRUB_ROOTFS=$(awk '/[[:space:]]\/[[:space:]]/ { print $1 }' /etc/fstab)
-       local GRUB_BOOTFS=$(awk '/[[:space:]]\/boot[[:space:]]/ { print $1 }' /etc/fstab)
+       local GRUB_BOOTFS=$(awk '/^[^#].+[[:space:]]\/boot[[:space:]]/ { print $1 }' /etc/fstab)
 
        # If /boot is not defined in /etc/fstab, it must be the same as /
        [ "x$GRUB_BOOTFS" == 'x' ] && GRUB_BOOTFS=$GRUB_ROOTFS
index 06ba683f849378055f31514f8712ec57c72b4ca8..aa739daf1bb956ff2ba66ff2efcc4d7c609b2bd4 100644 (file)
@@ -20,10 +20,19 @@ modules_scan() {
        MODS=`cat /etc/modules/${1}`
        for x in ${MODS}
        do
-               echo -ne "${BOLD}   ::${NORMAL} Scanning for ${x}..."
-               modprobe ${x} -n
-               backup
-               echo -ne "${NORMAL}"
+               MLOAD=`echo ${MLIST} | sed -e "s/.*${x}.*/${x}/"`
+               if [ "${MLIST}" = "${x}" ] # Only module to no-load
+               then
+                       echo -e "${BOLD}   ::${NORMAL} Skipping ${x}..."
+               elif [ "${MLOAD}" = "${MLIST}" ] # == No change == No specified no-load
+               then
+                       echo -ne "${BOLD}   ::${NORMAL} Scanning for ${x}..."
+                       modprobe ${x} -n
+                       backup
+                       echo -ne "${NORMAL}"
+               else
+                       echo -e "${BOLD}   ::${NORMAL} Skipping ${x}..."
+               fi
        done
 }
 
@@ -65,7 +74,6 @@ kill_devfsd() {
 }
 
 runUdev() {
-
        mount -t tmpfs -o size=100k udev /dev
        mkdir /dev/pts
        mkdir /dev/shm
@@ -75,5 +83,4 @@ runUdev() {
        ln -snf /proc/self/fd/1 /dev/stdout
        ln -snf /proc/self/fd/2 /dev/stderr
        ln -snf /proc/kcore /dev/core
-
 }
index 0d27da297d5df877e0db9ed31e886b1b35509939..eb35e79cc4645f700188453cbc6ec4d98edf3d76 100644 (file)
@@ -62,10 +62,16 @@ do
                real_init\=*)
                        REAL_INIT=`parse_opt "${x}"`
                ;;
+               scandelay=\*)
+                       SDELAY=`parse_opt "${x}"`
+               ;;
                scandelay)
                        SDELAY=10
                ;;
-               *)
+               noload\=*)
+                       MLIST=`parse_opt "${x}"`
+                       MLIST="`echo ${MLIST} | sed -e \"s/,/ /\"`"
+                       export MLIST
                ;;
        esac
 done
@@ -163,6 +169,7 @@ then
                fi
        fi
 
+bootstrapCD() {
        if [ "${CDROOT_DEV}" = '' ]
        then
                findcdmount /newroot/dev/cdroms/*
@@ -174,6 +181,22 @@ then
                # Device specified on command line
                findcdmount /newroot/${CDROOT_DEV}
        fi
+}
+
+       bootstrapCD
+       if [ "${REAL_ROOT}" = '' ]
+       then
+               echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waiting for new devices"
+               sleep 3
+               echo -n '.'
+               sleep 3
+               echo -n '.'
+               sleep 3
+               echo -n '.'
+               sleep 1
+               echo -e "${NORMAL}"
+               bootstrapCD
+       fi
 
        if [ "${REAL_ROOT}" = '' ]
        then
@@ -418,7 +441,7 @@ if [ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ]
 then
        umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!'
        mount -n --move /tmp/.initrd/dev dev || echo '*: Failed to move over the /dev tree!'
-       rm /tmp/.initrd/dev -rf || '*: Failed to remove the initrd /dev!'
+       rm -rf /tmp/.initrd/dev || '*: Failed to remove the initrd /dev!'
 elif [ "${USE_UDEV_NORMAL}" -eq '1' ]
 then
        rm /tmp/.initrd/dev/fd || echo '*: Failed to rm the initrd fd!'
@@ -434,7 +457,7 @@ then
        umount /tmp/.initrd/proc || echo "*: Failed to unmount the initrd /proc!"
        umount /dev 2>/dev/null
        mount -n --move /tmp/.initrd/dev dev 2>/dev/null
-       rm /tmp/.initrd/dev -rf || '*: Failed to remove the initrd /dev!'
+       rm -rf /tmp/.initrd/dev || '*: Failed to remove the initrd /dev!'
 
        umount /sys 2>/dev/null
        umount /tmp/.initrd/sys 2>/dev/null
index 914864f2700e4aa9d114b4f6e753512b36cf11eb..672f707f62f7e3036f09cfa350bd7e7ec2cbb75b 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Genkernel v3
 
-GK_V='3.1.0d'
+GK_V='3.1.0e'
 TEMP='/var/tmp/genkernel'
 TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.
 
@@ -171,8 +171,10 @@ then
                        echo
                        echo
                        eval ${CMD_POSTCONF} | tee -a ${DEBUGFILE}
+                       CMD_STATUS="${PIPESTATUS[0]}"
                        echo
-                       print_info 1 "<<< Postconf callback exit status: ${PIPESTATUS[0]}"
+                       print_info 1 "<<< Postconf callback exit status: ${CMD_STATUS}"
+                       [ "${CMD_STATUS}" -ne 0 ] && gen_die '--postconf failed!'
                else
                        echo
                        print_info 1 '>>> Postconf cancelled...'
@@ -188,7 +190,10 @@ then
                        [ -z "${GENSPLASH_THEME}" ] && [ -e /etc/conf.d/splash ] && source /etc/conf.d/splash
                        [ -z "${GENSPLASH_THEME}" ] && GENSPLASH_THEME=default
                        print_info 1 "  >> Installing gensplash [ using the ${GENSPLASH_THEME} theme ]..."
+                       # 2.6.9
                        sed -i -e 's:$(obj)/gen_init_cpio $(initramfs-y) FORCE:$(if $(shell [ ! -f $(obj)/initramfs_data.cpio ] \&\& echo 1 ), $(obj)/gen_init_cpio $(initramfs-y)):' ${KERNEL_DIR}/usr/Makefile
+                       # 2.6.10
+                       sed -i -e 's:$(obj)/gen_init_cpio \\:$(if $(shell [ ! -f $(obj)/initramfs_data.cpio ] \&\& echo 1 ), $(obj)/gen_init_cpio $(initramfs-y) $(obj)/initramfs_list):' -e 's:$(initramfs-y) $(obj)/initramfs_list FORCE::' ${KERNEL_DIR}/usr/Makefile
                        splash_geninitramfs -g ${KERNEL_DIR}/usr/initramfs_data.cpio.gz ${GENSPLASH_THEME}
                        gunzip ${KERNEL_DIR}/usr/initramfs_data.cpio.gz
                else
@@ -231,8 +236,10 @@ then
                echo
                echo
                eval ${CMD_CALLBACK} | tee -a ${DEBUGFILE}
+               CMD_STATUS="${PIPESTATUS[0]}"
                echo
-               print_info 1 "<<< Callback exit status: ${PIPESTATUS[0]}"
+               print_info 1 "<<< Callback exit status: ${CMD_STATUS}"
+               [ "${CMD_STATUS}" -ne 0 ] && gen_die '--callback failed!'
        else
                echo
                print_info 1 ">>> Callback cancelled..."