summaryrefslogtreecommitdiff
path: root/packages/slugos-init
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2006-01-30 00:16:23 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-30 00:16:23 +0000
commitea748f84046d22252abe8a5a6d160a73bcb2e92f (patch)
treef07ff4a84b1530dd7cafc12f98f6ff6885108045 /packages/slugos-init
parentad744e7896ccb0b83a8ff0ca30dc4ef7a776e105 (diff)
slugos-init: update to use 'beep' in 0.10
- boot scripts now use the new beep arguments
Diffstat (limited to 'packages/slugos-init')
-rw-r--r--packages/slugos-init/files/boot/disk1
-rw-r--r--packages/slugos-init/files/boot/flash2
-rw-r--r--packages/slugos-init/files/boot/nfs6
-rw-r--r--packages/slugos-init/files/boot/ram3
-rw-r--r--packages/slugos-init/files/leds16
-rw-r--r--packages/slugos-init/files/reflash4
-rw-r--r--packages/slugos-init/files/turnup2
-rw-r--r--packages/slugos-init/slugos-init_0.10.bb2
8 files changed, 25 insertions, 11 deletions
diff --git a/packages/slugos-init/files/boot/disk b/packages/slugos-init/files/boot/disk
index e8d1f5245b..f603d0f711 100644
--- a/packages/slugos-init/files/boot/disk
+++ b/packages/slugos-init/files/boot/disk
@@ -46,4 +46,5 @@ then
fi
fi
# fallback - use the flash boot
+leds beep -f 1000 -r 2
exec /boot/flash
diff --git a/packages/slugos-init/files/boot/flash b/packages/slugos-init/files/boot/flash
index 12729d7b5d..37a1055763 100644
--- a/packages/slugos-init/files/boot/flash
+++ b/packages/slugos-init/files/boot/flash
@@ -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!)
diff --git a/packages/slugos-init/files/boot/nfs b/packages/slugos-init/files/boot/nfs
index 5f1cbbe323..856f4e56b9 100644
--- a/packages/slugos-init/files/boot/nfs
+++ b/packages/slugos-init/files/boot/nfs
@@ -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
diff --git a/packages/slugos-init/files/boot/ram b/packages/slugos-init/files/boot/ram
index 42ff8329f9..a7c78b39ac 100644
--- a/packages/slugos-init/files/boot/ram
+++ b/packages/slugos-init/files/boot/ram
@@ -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
diff --git a/packages/slugos-init/files/leds b/packages/slugos-init/files/leds
index 8132a22046..b614dd60d8 100644
--- a/packages/slugos-init/files/leds
+++ b/packages/slugos-init/files/leds
@@ -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
}
diff --git a/packages/slugos-init/files/reflash b/packages/slugos-init/files/reflash
index ad1c4c26ad..9108e36821 100644
--- a/packages/slugos-init/files/reflash
+++ b/packages/slugos-init/files/reflash
@@ -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
diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup
index 0d50e4d39a..19c5af1745 100644
--- a/packages/slugos-init/files/turnup
+++ b/packages/slugos-init/files/turnup
@@ -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 "$@"
diff --git a/packages/slugos-init/slugos-init_0.10.bb b/packages/slugos-init/slugos-init_0.10.bb
index 8ec69e88f1..06d8b7db22 100644
--- a/packages/slugos-init/slugos-init_0.10.bb
+++ b/packages/slugos-init/slugos-init_0.10.bb
@@ -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 \