initscripts-slugos: further fixes to checkroot.sh in 1.0
authorJohn Bowler <jbowler@nslu2-linux.org>
Mon, 6 Feb 2006 02:42:55 +0000 (02:42 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 6 Feb 2006 02:42:55 +0000 (02:42 +0000)
slugos-init: make beep silent, extend single_user_ok function in 0.10

packages/initscripts/initscripts-1.0/slugos/checkroot.sh
packages/initscripts/initscripts-slugos_1.0.bb
packages/slugos-init/files/functions
packages/slugos-init/files/leds
packages/slugos-init/slugos-init_0.10.bb

index a26b9ff..c70855e 100644 (file)
@@ -4,6 +4,7 @@
 # Version:     @(#)checkroot.sh  2.84  25-Jan-2002  miquels@cistron.nl
 #
 
+. /etc/default/functions
 . /etc/default/rcS
 
 #
@@ -133,8 +134,15 @@ else
       # Start a single user shell on the console
       if single_user_ok
       then
-       sulogin $CONSOLE
-       reboot -f
+       sulogin -t 600 $CONSOLE
+       # if this exits with SIGALRM (which happens to be 142) the
+       # timeout happened, do not, then, reboot!
+       if test $? -ne 142
+       then
+         reboot -f
+       else
+         echo "/etc/init.d/checkroot.sh: sulogin timeout, continuing boot"
+       fi
       else
        echo "/etc/init.d/checkroot.sh: fsck failed, continuing boot"
       fi
index 3219f88..df89fd1 100644 (file)
@@ -11,7 +11,7 @@ RCONFLICTS = "initscripts"
 # All other standard definitions inherited from initscripts
 # Except the PR which is hacked here.  The format used is
 # a suffix
-PR := "${PR}.7"
+PR := "${PR}.8"
 
 FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
 
index df74aea..78dcf81 100644 (file)
@@ -35,7 +35,7 @@ single_user_ok() {
        test "$SULOGIN" = yes -o "$SULOGIN" = ok ||
                case "$(machine)" in
                ixdp*|avila|loft)
-                       return 0;;
+                       test "$SULOGIN" != never;;
                *)      return 1;;
                esac
 }
index 227ed78..433467b 100644 (file)
@@ -169,7 +169,8 @@ sysled(){
 #
 # beep {arguments}
 #  emit a beep
-#  does nothing if there is no beep executable
+#  does nothing if there is no beep executable, is very
+#  quiet in the presence of errors
 beep(){
        local arg
        arg=
@@ -177,7 +178,7 @@ beep(){
        if test -x /bin/beep
        then
                test -c /dev/buzzer && arg="-e /dev/buzzer"
-               /bin/beep $arg "$@"
+               /bin/beep $arg "$@" 2>/dev/null
        fi
        return 0
 }
index d8376ef..ed183b9 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 LICENSE = "GPL"
 DEPENDS = "base-files devio"
 RDEPENDS = "busybox devio"
-PR = "r55"
+PR = "r56"
 
 SRC_URI = "file://boot/flash \
           file://boot/disk \