summaryrefslogtreecommitdiff
path: root/recipes-core/initscripts
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-11-13 16:41:26 -0600
committerJesse Gilles <jgilles@multitech.com>2014-11-13 16:43:43 -0600
commit455a5de05a908ff32cce2d9500e774fb8cd5a1dc (patch)
tree437566dc5b11a65f4b8be363787e0590e7470433 /recipes-core/initscripts
parent25c978b3909c7f8ac874a64743e58d33e774c3a0 (diff)
downloadmeta-mlinux-455a5de05a908ff32cce2d9500e774fb8cd5a1dc.tar.gz
meta-mlinux-455a5de05a908ff32cce2d9500e774fb8cd5a1dc.tar.bz2
meta-mlinux-455a5de05a908ff32cce2d9500e774fb8cd5a1dc.zip
initscripts: fix LED flashing behavior during flash upgrade
Diffstat (limited to 'recipes-core/initscripts')
-rw-r--r--recipes-core/initscripts/initscripts-1.0/umountfs14
-rw-r--r--recipes-core/initscripts/initscripts_1.0.bbappend2
2 files changed, 10 insertions, 6 deletions
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
diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend
index d00d5f5..54a7ed5 100644
--- a/recipes-core/initscripts/initscripts_1.0.bbappend
+++ b/recipes-core/initscripts/initscripts_1.0.bbappend
@@ -2,3 +2,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
# flash on reboot/umountfs needs regular umount (not busybox)
RDEPENDS_${PN} += "util-linux-umount util-linux-mount bash"
+
+PR .= ".1"