From 62a27eef777ac83191fdc509b0896ff788ad3548 Mon Sep 17 00:00:00 2001 From: "ke.hu" Date: Mon, 20 Mar 2017 16:16:45 +0100 Subject: [PATCH] LED setting set led to notice state when init. After all init done, change to OK state --- .../files/etc/init.d/peripheral_led_normal | 15 +++++++++++++++ .../files/etc/init.d/peripheral_manager | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 peripheral_manager/files/etc/init.d/peripheral_led_normal diff --git a/peripheral_manager/files/etc/init.d/peripheral_led_normal b/peripheral_manager/files/etc/init.d/peripheral_led_normal new file mode 100755 index 000000000..a1041317a --- /dev/null +++ b/peripheral_manager/files/etc/init.d/peripheral_led_normal @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common + +START=99 + + +USE_PROCD=0 +NAME=peripheral_led_normal + +start_service() { + ubus -t 2 wait_for led.status + ubus call led.status set '{"state":"ok"}' + ubus -t 2 wait_for button +} + + diff --git a/peripheral_manager/files/etc/init.d/peripheral_manager b/peripheral_manager/files/etc/init.d/peripheral_manager index ca4c22552..34c5e1e17 100755 --- a/peripheral_manager/files/etc/init.d/peripheral_manager +++ b/peripheral_manager/files/etc/init.d/peripheral_manager @@ -16,7 +16,7 @@ start_service() { service_running() { ubus -t 2 wait_for led.status - ubus call led.status set '{"state":"ok"}' + ubus call led.status set '{"state":"notice"}' ubus -t 2 wait_for button }