3 # This script is executed at the start and end of each run-level
4 # transition. It is the first 'stop' script and the last 'start'
7 # 'stop' sets the correct colour power LED to flash between the
8 # two colours of the previous and next runlevel.
9 # 'start' sets the LED to steady
11 # 'red' is the initial setting on kernel boot
13 # 'amber' is used for run levels S (from /linuxrc), 0 (halt),
14 # 1 (single user) and 6 (reboot). halt and reboot do not
15 # terminate therefore the LED remains flashing until the
18 # 'green' is used for run levels 2-5 - the normal user run levels.
20 # colours are 'g' (green), 'r' (red) or 'gr' (amber).
26 *) echo "led change: $runlevel: runlevel unknown" >&2
31 # leds syntax is -A +<init state> /<new state>
33 start) leds -gr +"$(colour "$runlevel")";;
34 stop) leds -gr +"$(colour "$previous")" /"$(colour "$runlevel")";;
35 *) echo "led change: $1: command ignored" >&2;;