From 455a5de05a908ff32cce2d9500e774fb8cd5a1dc Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Thu, 13 Nov 2014 16:41:26 -0600 Subject: initscripts: fix LED flashing behavior during flash upgrade --- recipes-core/initscripts/initscripts-1.0/umountfs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'recipes-core/initscripts/initscripts-1.0/umountfs') diff --git a/recipes-core/initscripts/initscripts-1.0/umountfs b/recipes-core/initscripts/initscripts-1.0/umountfs index 1c9a9ce..f555aba 100644 --- a/recipes-core/initscripts/initscripts-1.0/umountfs +++ b/recipes-core/initscripts/initscripts-1.0/umountfs @@ -24,13 +24,15 @@ umount_all() { } blink_leds() { - leds=/sys/class/leds/* - nleds=$(echo $leds | wc -w) + led_dir=/sys/class/leds + # blink all programmable LEDs except status + leds=$(ls $led_dir/ | grep -v status) + nleds=$(echo "$leds" | wc -w) # turn LEDs off for led in $leds; do - echo "timer" > $led/trigger - echo 0 > $led/delay_off + echo "timer" > $led_dir/$led/trigger + echo 0 > $led_dir/$led/delay_off done int=200 @@ -40,8 +42,8 @@ blink_leds() { # make a pattern for led in $leds; do - echo "$on" > $led/delay_on - echo "$off" > $led/delay_off + echo "$on" > $led_dir/$led/delay_on + echo "$off" > $led_dir/$led/delay_off on=$(( on - int )) off=$(( total - on )) done -- cgit v1.2.3