Move busybox --install -s to outside the /init check. Fix problems with running...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 14 Feb 2008 04:34:44 +0000 (04:34 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 14 Feb 2008 04:34:44 +0000 (04:34 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@595 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
generic/linuxrc

index a6e6f9a81c54c2b9249706f7d983d8ba1a427b75..56d50db5dc57018c7c84dd7c852fb366dc65d366 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> generic/linuxrc:
+  Move busybox --install -s to outside the /init check. Fix problems with
+  running mknod on a non-CD root filesystem, which will be read-only, for bug
+  #208266.
+
   14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> -um/kernel-config-2.4,
   -alpha/kernel-config-2.4, -parisc64/kernel-config-2.4,
   -xenU/kernel-config-2.4, -parisc/kernel-config-2.4,
index 7cf09f5d6b287d9d38bae5950c37e503aa9963f5..3292d3eb7cd32a50f66cef38ec865c967270ab72 100644 (file)
@@ -24,10 +24,10 @@ mount -t proc proc /proc >/dev/null 2>&1
 mount -o remount,rw / >/dev/null 2>&1
 
 # Set up symlinks
+/bin/busybox --install -s
+
 if [ "$0" = '/init' ]
 then
-       /bin/busybox --install -s
-
        [ -e /linuxrc ] && rm /linuxrc
         
        if [ -e /bin/lvm ]
@@ -110,7 +110,7 @@ do
                debug)
                        DEBUG='yes'
                ;;
-                # Scan delay options 
+               # Scan delay options 
                scandelay\=*)
                        SDELAY=`parse_opt "${x}"`
                ;;
@@ -131,7 +131,7 @@ do
                        export MLIST
                ;;
                # Redirect output to a specific tty
-               CONSOLE\=*)
+               CONSOLE\=*\|console\=*)
                        CONSOLE=`parse_opt "${x}"`
                        exec >${CONSOLE} <${CONSOLE} 2>&1
                ;;
@@ -274,7 +274,7 @@ then
        fi
 
        # Required for gensplash to work.  Not an issue with the initrd as this
-       # device isnt created there and is not needed.
+       # device isn't created there and is not needed.
        if [ -e /dev/tty1 ]
        then
                [ ! -e ${NEW_ROOT}/dev/tty1 ] && mknod ${NEW_ROOT}/dev/tty1 c 4 1
@@ -566,6 +566,7 @@ then
                        FS_LOCATION='mnt/livecd'
                fi
        fi
+
 #
 # End cdrom looptype determination and mounting if necessary
 #
@@ -666,8 +667,13 @@ verbose_kmsg
 
 if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
 then
-       [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
-       echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting${NORMAL}"
+       if [ ! -e ${CHROOT}/dev/console ] || [ ! -e ${CHROOT}/dev/null ] \
+       || [ ! -e ${CHROOT}/dev/tty1 ]
+       then
+               echo -ne "${BAD}>>{NORMAL}${BOLD} ERROR: /dev is broken!${NORMAL}"
+       else
+               echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting${NORMAL}"
+       fi
 
        cd ${CHROOT}
        mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
@@ -717,9 +723,13 @@ then
 EOF
 elif [ "$0" = '/init' ]
 then
-       [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
-       [ ! -e ${CHROOT}/dev/tty1 ] && mknod ${CHROOT}/dev/tty1 c 4 1
-       echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
+       if [ ! -e ${CHROOT}/dev/console ] || [ ! -e ${CHROOT}/dev/null ] \
+       || [ ! -e ${CHROOT}/dev/tty1 ]
+       then
+               echo -ne "${BAD}>>{NORMAL}${BOLD} ERROR: /dev is broken!${NORMAL}"
+       else
+               echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
+       fi
 
        cd ${CHROOT}
        mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null