Fox_exe wrote:
mariogolf wrote:> I’ve a question: When wdmc goes poweroff, is the led corol always green after completed poweroff?
Hmm. No, he switch to yellow, then - to white.
Its controlled by /etc/init.d/wd-leds.sh
Example wd-leds.sh:
#! /bin/sh
BEGIN INIT INFO
Provides: led_init
Required-Start: $remote_fs $syslog
Required-Stop: $remote_fs $syslog
Default-Start: 1 2 3 4 5 6
Default-Stop: 0 6
Short-Description: Start daemon at boot time
Description: Set LED color at start/stop.
END INIT INFO
case “$1” in
start)
echo “Set LED to Green”
echo green > /sys/class/leds/system_led/color
;;
stop)
echo “Set LED to yellow”
echo yellow > /sys/class/leds/system_led/color
;;
*)
echo “Usage: /etc/init.d/led_boot {start|stop}”
exit 1
;;
esacchmod a+x /etc/init.d/wd-leds.sh
update-rc.d wd-leds.sh defaults
This is wd-led.sh in /etc/init.d/
#! /bin/sh
### BEGIN INIT INFO
# Provides: led_init
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Set LED color at start/stop.
### END INIT INFO
case "`runlevel`" in
"0 0"|"N 0"|"0")
echo blue > /sys/class/leds/system_led/color
;;
"0 1"|"N 1")
echo yellow > /sys/class/leds/system_led/color
;;
"1 2"|"N 2")
echo green > /sys/class/leds/system_led/color
;;
"2 6"|"N 6")
echo yellow > /sys/class/leds/system_led/color
;;
esac
#case "$1" in
# start)
# echo "Set LED to Green "
# echo green > /sys/class/leds/system_led/color
# ;;
# stop)
# echo "Set LED to yellow "
# echo yellow > /sys/class/leds/system_led/color
# ;;
# *)
# echo "Usage: /etc/init.d/led_boot {start|stop}"
# exit 1
# ;;
#esac
# exit 0
Have you suggestions for me? Have I to replace it with your example?
Then, I upgraded system.
wdmc upgraded also openmediavault it have asked to me if overwrite the default version of /etc/default/openmediavault or no.
I have denied this request. Is it ok?
thank you again!