On Tue, Aug 25, 2009 at 6:03 AM, Thomas Bächler<thomas@archlinux.org> wrote:
A function add_hook can be called from functions.d to register a hook function. The existing hooks are based on suggestions from Michael Towers (larch) and on the implementation of initscripts-extras-fbsplash which currently uses the strings passed to stat_busy and stat_done for this. More hooks can be added if requested.
The implementation uses associative arrays and will thus only work with bash 4 or later.
The changes have been commited to initscripts.git, but have not yet been extensively tested, only basic functionality tests have been performed: http://projects.archlinux.org/?p=initscripts.git;a=commitdiff;h=cfabb85924f3...
This should make life easier for larch (not exactly sure what they need it for) and will make initscripts-extras-fbsplash much cleaner to implement. Don't hesitate to request more hooks here.
A description of the existing hooks is in rc.d/functions.
I read through this, and was a little bit hesitant on this functionality. But then I gave in. Something about it feels weird to me, but if we just get it in there, it can be improved incrementally. Would it be useful to look into the stages/names that debian uses for their hooks system? Check their initramfs tools for their naming (there's a lot).