diff options
author | Mike Westerhof <mwester@dls.net> | 2007-08-12 01:53:26 +0000 |
---|---|---|
committer | Mike Westerhof <mwester@dls.net> | 2007-08-12 01:53:26 +0000 |
commit | 71a9178996e3d4f74a1a6a8b390acaf68d3a4a39 (patch) | |
tree | fc23ea912d649c477673a4da5099ef63fe45b715 /packages/slugos-init/files | |
parent | 1f4287261e131a7bf472bd6424acafe8b05592ae (diff) |
zleds: announce via beeper when rc3.d scripts are completed (ssh login is ready).
Diffstat (limited to 'packages/slugos-init/files')
-rw-r--r-- | packages/slugos-init/files/initscripts/zleds | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/packages/slugos-init/files/initscripts/zleds b/packages/slugos-init/files/initscripts/zleds index f5bd703b65..4c8277a53d 100644 --- a/packages/slugos-init/files/initscripts/zleds +++ b/packages/slugos-init/files/initscripts/zleds @@ -21,8 +21,25 @@ state(){ esac } +# trumpet "beeps" an announcement on systems with such support. +l=120 # Long beep time +s=40 # Try to keep a 3:1 ratio +trumpet(){ + case "$1" in + k) leds beep -l $l; leds beep -l $s; leds beep -l $l;; + n) leds beep -l $l; leds beep -l $s;; + *) leds beep;; + esac +} + case "$1" in -start) leds "$(state "$runlevel")";; -stop) leds boot "$(state "$runlevel")";; -*) echo "led change: $1: command ignored" >&2;; +start) leds "$(state "$runlevel")" + if [ "$(state "$runlevel")" == "user" ]; then + trumpet "k" + fi + ;; +stop) leds boot "$(state "$runlevel")" + ;; +*) echo "led change: $1: command ignored" >&2 + ;; esac |