slugos-init: update to use 'beep' in 0.10
authorJohn Bowler <jbowler@nslu2-linux.org>
Mon, 30 Jan 2006 00:16:23 +0000 (00:16 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 30 Jan 2006 00:16:23 +0000 (00:16 +0000)
 - boot scripts now use the new beep arguments

packages/slugos-init/files/boot/disk
packages/slugos-init/files/boot/flash
packages/slugos-init/files/boot/nfs
packages/slugos-init/files/boot/ram
packages/slugos-init/files/leds
packages/slugos-init/files/reflash
packages/slugos-init/files/turnup
packages/slugos-init/slugos-init_0.10.bb

index e8d1f52..f603d0f 100644 (file)
@@ -46,4 +46,5 @@ then
        fi
 fi
 # fallback - use the flash boot
+leds beep -f 1000 -r 2
 exec /boot/flash
index 12729d7..37a1055 100644 (file)
@@ -2,8 +2,8 @@
 # boot from the current (flash) root partition
 # nothing need be done apart from setting the
 # system LED status correctly
-. /etc/default/functions
 leds beep
+. /etc/default/functions
 leds boot system
 test -x /sbin/init && exec /sbin/init
 # fallback if /sbin/init has been deleted (bad!)
index 5f1cbbe..856f4e5 100644 (file)
@@ -3,11 +3,12 @@
 # must be given) using options from the rest of
 # the command line.
 #
+# Use the standard init path (see /etc/init.d/rcS)
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+#
 . /etc/default/functions
 leds boot system
 #
-# Use the standard init path (see /etc/init.d/rcS)
-export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 if /boot/network
 then
        # network is up and running, the NFS mount will
@@ -15,4 +16,5 @@ then
        exec /boot/disk "$@"
 fi
 # fallback - use the flash boot
+leds beep -f 1000 -r 2
 exec /boot/flash
index 42ff832..a7c78b3 100644 (file)
@@ -9,7 +9,7 @@ export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 # Load the helper functions
 . /etc/default/functions
 #
-leds beep double
+leds beep -r 2
 leds boot system
 #
 if test -n "$1"
@@ -45,4 +45,5 @@ then
        fi
 fi
 # fallback - use the flash boot
+leds beep -f 1000 -r 2
 exec /boot/flash
index 8132a22..b614dd6 100644 (file)
@@ -166,10 +166,18 @@ sysled(){
 }
 
 #
-# beep [double]
-#  emit a beep, or a double beep
-#  dummy - at present does  nothing
+# beep {arguments}
+#  emit a beep
+#  does nothing if there is no beep executable
 beep(){
+       local arg
+       arg=
+       test "$1" = beep && shift
+       if test -x /bin/beep
+       then
+               test -c /dev/buzzer && arg="-e /dev/buzzer"
+               /bin/beep $arg "$@"
+       fi
        return 0
 }
 
@@ -192,7 +200,7 @@ leds_help(){
        echo "    trigger may be given.  'user' will use the default specified" >&2
        echo "    in USER_LED from /etc/default/rcS, if not specified a cpu" >&2
        echo "    activity setting appropriate to the machine is selected" >&2
-       echo "  beep [double]" >&2
+       echo "  beep {args}" >&2
        echo "    if possible cause the machine to emit a beep" >&2
 }
 
index ad1c4c2..9108e36 100644 (file)
@@ -208,7 +208,7 @@ then
        #
        # check the input file size
        test -n "$imgksize" -a "$imgksize" -gt 0 -a "$imgksize" -le "$ksize" || {
-               echo "reflash: $kfile: bad Kernel size ($s, max $ksize)" >&2
+               echo "reflash: $kfile: bad Kernel size ($imgksize, max $ksize)" >&2
                exit 1
        }
 fi
@@ -228,7 +228,7 @@ then
        #
        # check the input file size
        test -n "$imgffssize" -a "$imgffssize" -gt 0 -a "$imgffssize" -le "$ffssize" || {
-               echo "reflash: $ffsfile: bad Flashdisk size ($s, max $ffssize)" >&2
+               echo "reflash: $ffsfile: bad Flashdisk size ($imgffsize, max $ffssize)" >&2
                exit 1
        }
 fi
index 0d50e4d..19c5af1 100644 (file)
@@ -370,6 +370,7 @@ boot_rootfs() {
                        return 1
                };;
        ram)    {       echo '#!/bin/sh'
+                       echo 'leds beep'
                        echo 'rm -f /linuxrc.new'
                        echo 'ln -s boot/flash /linuxrc.new'
                        echo 'mv /linuxrc.new /linuxrc'
@@ -381,6 +382,7 @@ boot_rootfs() {
                        return 1
                };;
        *)      {       echo '#!/bin/sh'
+                       echo 'leds beep'
                        test "$sleep" -gt 0 && echo -n "sleep='$sleep' "
                        echo -n "exec '/boot/$type' '$device'"
                        for opt in "$@"
index 8ec69e8..06d8b7d 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 LICENSE = "GPL"
 DEPENDS = "base-files devio"
 RDEPENDS = "busybox devio"
-PR = "r49"
+PR = "r50"
 
 SRC_URI = "file://boot/flash \
           file://boot/disk \