[OpenWrt-Devel] "Runlevel" support for procd

Matthias Schiffer mschiffer at universe-factory.net
Tue Jul 29 13:05:01 EDT 2014


Our Freifunk firmware framework Gluon [1] based on OpenWrt provides a
special first-run wizard, the config mode/setup mode. In this mode,
almost no normal services are started, and a minimal (failsafe-like)
network configuration is used (via netifd's -c switch which was added by
an earlier patch by me).

In Attitude Adjustment, we did this through a very hacky init script
which was ordered before S20network and just blocked forever to prevent
the other init scripts from running.

With procd, this hack doesn't work anymore, as procd will also block
shutdown/reboot when an init script is still running. The possiblity to
switch to an entirely different set of init scripts would allow us to
implement the setup mode in a much saner way :D

Of cource, we could also carry such patches downstream, but we're always
interested in finding a common solution so others can benefit from our
work :)

[1] https://github.com/freifunk-gluon/gluon



On 07/29/2014 05:59 PM, John Crispin wrote:
> please explain the use case that this will solve.
> 
> at the time of design we decided to not support run levels as we had no
> valid uses cases that required run levels
> 
> 
> On 29/07/2014 17:06, Matthias Schiffer wrote:
>> Hi,
>> I'd like to add a feature similar to runlevels to procd; I don't need
>> switching at runtime though. So far my plan is to make the following
>> three changes:
>>
>> * Allow reading sysinit initscipts from a different directory than
>> /etc/rc.d (maybe by adding a third parameter to the runrc handler?)
>>
>> * Allow specifying an alternative inittab on the procd cmdline
>>
>> * Allow providing cmdline arguments for procd from preinit (through a
>> file in /tmp like debug_level?)
>>
>> Any comments?
>>
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140729/ff65a60d/attachment.sig>
-------------- next part --------------
_______________________________________________
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