Disable front blue LED after reboot on Netgate 6100

Hello, I have a Netgate 6100 and I am trying to disable the blue LED on the front of the device so it is persistent after a reboot. I have the command to do this and I can disable the LED via a ssh shell session or by using the "Command Prompt" section in the GUI, but if the device is rebooted the LED is enabled again.

To attempt disabling this during boot I am using the "Shellcmd" package, but I can't seem to get it working. I have been unable to find anything in the logs indicating that the command failed.

Using the "Shellcmd" package settings via the GUI I added the command as seen below.

This is the command I am attempting to run during boot.

echo 0 > /dev/led/blue1

If I download the xml configuration file I find the command is added into the config as follows within the <system> section after adding the command above to the "Shellcmd package".

<shellcmd>echo 0 &gt; /dev/led/blue1</shellcmd>

I found that the configuration file has the greater than sign > replaced with &gt;. Is this possibly causing the problem? I'm thinking this is to avoid confusing the XML tags, but is the proper command actually being ran by the system or should I be using an escape character before the >? Or maybe I'm out to lunch and the issue is something else?

Does anyone have any thoughts as to why this isnt working? Any help would be appreciated!

Thanks!

Update: Thanks for all the help! I was able to prove it was not an issue with the &gt; part, and it was actually due to the LED being set into a flashing state later in the boot process which overwrote my <shellcmd> setting. So I fixed this by using a script. For anyone else interested:

Create a file in /usr/local/etc/rc.d I named it disable_led.sh (or whatever name you want, but it needs to include .sh at the end so it runs on boot). The sleep 60 part is important so it gives the system time to fully boot before disabling the LED.

#!/bin/sh
# Disable blue LED at boot
sleep 60
echo 0 > /dev/led/blue1

Once the file is created, set it as executable and reboot the system to test.

chmod +x disable_led.sh

Posted Sep 13, 2021, 6:50 PM UTC · edited

616
Loading comments…