Same issue as this:
My Initscript:
#!/bin/sh /etc/rc.common
START=97
enable()
{
start
}
disable()
{
stop
}
start()
{
ntpd -q -p openwrt.pool.ntp.org
if [[ $(date +%H) -ge 21 || $(date +%H) -lt 3 ]]
then
echo none > /sys/class/leds/green:lan/trigger
echo none > /sys/class/leds/green:wan/trigger
echo none > /sys/class/leds/green:wlan-2/trigger
echo none > /sys/class/leds/green:wlan-5/trigger
echo 0 > /sys/class/leds/green:power/brightness
else
stop
fi
}
stop()
{
/etc/init.d/led start
}
Fortunately, thank god, I didn't mark this thread as solved because earlier I was thinking that if initscript doesn't work then I will use Startup
subsection's Local Startup
tab (which controls /etc/rc.local
file) to execute the LED-turn-off script file to turn off LEDs as suggested by @maurer and @elbertmai but when I used rc.local
and the executed script sends LED off commands to all 5 LEDs (lan
, wan
, power
, wlan-2
, wlan-5
) after reboot, only lan and wan LEDs turn off but no effect on power
, wlan-2
and wlan-5
LEDs (they remain on).
When I explicitly execute the script from ssh then all LEDs turn off but not if the script gets executed after reboot automatically as defined by me in rc.local
.
Neither rc.local
file worked nor initscript is getting enabled permanently. Now what should I do ? Someone please guide me.
Tested multiple times but didn't work. So this thread is still unsolved. Good that I didn't close this as solved.