diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-08-08 12:23:41 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-08-08 12:23:41 +0000 |
commit | 3501c0716c24890a945c711e1ad7c6c218121b66 (patch) | |
tree | 41ee6e64e69845c7a4d5b65e7993b9f9cc08cc28 /target/linux/rdc-2.6/base-files | |
parent | 38d4bfb9ef5a238cc80315e0134d9615bdc166c0 (diff) | |
download | upstream-3501c0716c24890a945c711e1ad7c6c218121b66.tar.gz upstream-3501c0716c24890a945c711e1ad7c6c218121b66.tar.bz2 upstream-3501c0716c24890a945c711e1ad7c6c218121b66.zip |
Use the dmz led as diagnostic led
SVN-Revision: 8380
Diffstat (limited to 'target/linux/rdc-2.6/base-files')
-rw-r--r-- | target/linux/rdc-2.6/base-files/default/etc/diag.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/rdc-2.6/base-files/default/etc/diag.sh b/target/linux/rdc-2.6/base-files/default/etc/diag.sh new file mode 100644 index 0000000000..8d5c38262c --- /dev/null +++ b/target/linux/rdc-2.6/base-files/default/etc/diag.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# Copyright (C) 2007 OpenWrt.org + +set_led() { + local led="$1" + local state="$2" + [ -d "/sys/class/leds/rdc321x:$led" ] && echo "$state" > "/sys/class/leds/rdc321x:$led/brightness" +} + +set_state() { + case "$1" in + preinit) + set_led dmz 1 + ;; + done) + set_led dmz 0 + ;; + esac +} |