Jump to content

Recommended Posts

Posted

Hi,

on a lime2 the firstrun script hangs as it doesn't seem to have a red or blue LED.
So I'd like to propose the following change which shouldn't break anything but add the green one. Unless some vendor adds even more colors. :lol:

Not sure if the trailing "|| true" is the best solution to make sure the script will never fail?

diff --git a/scripts/firstrun b/scripts/firstrun
index 760cf0d..2f2b222 100644
--- a/scripts/firstrun
+++ b/scripts/firstrun
@@ -119,8 +119,8 @@ adjust_sunxi_settings() {
         sed -i "s/^MAC_ADDR=.*/MAC_ADDR=${MACADDR}/" /etc/default/brcm40183 \
         echo -e "\n### [firstrun] Use MAC address ${MACADDR} for Bluetooth from now" >>${Log})
     
-    # trigger red or blue LED as user feedback
-    echo heartbeat >/sys/class/leds/*red*/trigger 2>/dev/null || echo heartbeat >/sys/class/leds/*blue*/trigger 2>/dev/null    
+    # trigger red, blue or green LED as user feedback
+    echo heartbeat >/sys/class/leds/*red*/trigger 2>/dev/null || echo heartbeat >/sys/class/leds/*blue*/trigger 2>/dev/null || echo heartbeat >/sys/class/leds/*green*/trigger 2>/dev/null || true
     [ -f /etc/wicd/wired-settings.conf ] && \
         read HOSTNAME </etc/hostname
         sed -i "s/^dhcphostname =.*/dhcphostname = ${HOSTNAME}/" /etc/wicd/wired-settings.conf && \

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines