leds: add geos router support, updated alix leds.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 15 Feb 2014 15:39:22 +0000 (16:39 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 15 Feb 2014 15:39:22 +0000 (16:39 +0100)
src/initscripts/init.d/leds

index 3bd27a4..52ef270 100644 (file)
@@ -50,6 +50,14 @@ disable_led_trigger ()
        fi
 }
 
+# enable LED
+enable_led ()
+{
+       if [ -d "/sys/class/leds/$1" ]; then
+               echo "1" >        /sys/class/leds/$1/brightness
+       fi
+}
+
 case "${1}" in
        start)
                # Alix LED start
@@ -57,6 +65,11 @@ case "${1}" in
                setup_netdev_trigger alix:2 ${RED_DEV} rx
                setup_netdev_trigger alix:3 ${RED_DEV} tx
 
+               # Geos LED start
+               setup_heartbeat_trigger geos:1
+               setup_netdev_trigger geos:2 ${RED_DEV} rx
+               setup_netdev_trigger geos:3 ${RED_DEV} tx
+
                # Dreamplug
                setup_netdev_trigger dreamplug:green:wlan ${GREEN_DEV} tx rx
                setup_netdev_trigger dreamplug:blue:wlanap ${BLUE_DEV} tx rx
@@ -80,9 +93,16 @@ case "${1}" in
        stop)
                # Alix LED stop
                disable_led_trigger alix:1
+               enable_led alix:1
                disable_led_trigger alix:2
                disable_led_trigger alix:3
 
+               # Geos LED stop
+               disable_led_trigger geos:1
+               enable_led geos:1
+               disable_led_trigger geos:2
+               disable_led_trigger geos:3
+
                # Dreamplug
                disable_led_trigger dreamplug:green:wlan
                disable_led_trigger dreamplug:blue:wlanap