Daniel Dickinson wrote:
> Hi all,
> 
> I've refreshed the patches to work with current trunk (as the old
> patches were no longer applying cleanly due to recent changes).  There
> are also a couple of minor functional changes some of which make the
> usb root stuff I'm working on easier.
> 
> I'd really appreciate if there could be some review/comments on these
> patches soon.  It's been a significant period of time and I haven't
> heard from full devs on what they think, although a couple of list
> members like the idea of the modularization I have done.
In principle, it looks useful. One thing I don't like that well is that
every hook you add has to be a separate file in /etc/preinit.d/run.d
I think it would be cleaner to have just an /etc/preinit.d with files
that are sourced at the beginning of preinit, which can then add
functions to various hooks that are defined by preinit.
For instance the netmsg plugin would then do something like this:

netmsg_send_message() {
   netmsg [...]
}
netmsg_send_init() {
   failsafe_ip
   netmsg_send_message "Press reset to enter failsafe now"
}
netmsg_send_enter() {
   netmsg_send_message "Entering Failsafe!"
}

add_hook init netmsg_send_init
add_hook failsafe_enter netmsg_send_enter

I haven't actually tested your patches yet, I'll try to find the time
for it soon.

> I also have a question (not implemented at all).  How attached to the
> sequence of preinit->mount_root->init->rcS...->firstboot are you?
> 
> It would make some things work more consistently to have firstboot
> integrated into preinit instead of after all the processes have
> booted.  
> 
> The disadvantage is slower boot on the first boot.
> 
> I think the current firstboot unnecessarily complicates the process of
> the firstboot because there are configurations created during boot that
> have to be copied from tmp root and various pivots to try and rebase
> the root after having booted with with a temporary ramdisk root.  It
> would be much cleaner to do all the work in preinit and once init
> starts, it's a 'normal' system.
I don't think it's unnecessary complexity. People start to worry and
pull the plug early if the boot takes too long, and on some devices,
e.g. most of the production Fonera 2.0 devices can take *really* long
for their init. Much better to have the system up and running during
that time and even allow you to change stuff in the config.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to