[OpenWrt-Devel] Can we have "init" call for diag.sh (set_state)?

Rafał Miłecki zajec5 at gmail.com
Sat Dec 13 13:12:35 EST 2014


On 11 December 2014 at 21:17, John Crispin <blogic at openwrt.org> wrote:
> On 11/12/2014 20:59, Rafał Miłecki wrote:
>> Let me simplify booting process into following stages:
>> 1) preinit (LED blinking with medium freq)
>> 2) init (LED blinking with medium freq)
>> 3) done (LED state on)
>>
>> The problem is this duplicated "medium freq" and that diag.sh
>> (set_state) has only two of above stages:
>> 1) preinit
>> 2) done
>> So we can't signal that OpenWrt went from preinit to init and e.g.
>> failsafe is not accessible anymore.
>>
>> Could we change it? Is that OK if we add something like
>> init)
>> status_led_blink_init
>> with some low blinking frequency?
>>
>> The purpose of that is to let user know it's too late for entering a
>> failsafe mode.
>>
>
> sure sound like a good idea, wanna cook a patch ?

Sure. I played with it a bit, and there is one thing I'm not sure about.

1) Technically
It makes more sense to change change LED blinking when OpenWrt enters
"init" stage (after "preinit"). That would simply require
START=00
boot() {
        set_state init
}
in the /etc/init.d/setstate

2) Practically
For user it makes more sense to know when the failsafe mode can (not)
be entered. This would simply require
set_state preinit_post_failsafe_wait
at the end of /lib/preinit/30_failsafe_wait

Which would be better to implement?

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list