[klibc] [PATCH] RFC: Running initscripts from kinit
H. Peter Anvin
hpa at zytor.com
Fri May 7 17:30:56 PDT 2010
On 04/28/2010 01:39 PM, Mike Waychison wrote:
> For our platforms, we'd like to embed several different userland scripts /
> programs that are executed before we have mounted the root filesystem as part
> of the initramfs payload.
> Specifically, I'd like to have multiple scripts executed before do_mounts(), so
> I coded up this simple do_initscripts function that executes all executables
> found in /etc/init.d in alphabetically sorted order.
> I realize now that this could be all simplified to blindly calling:
> or similar though and leaving the drop directory handling to it (which is
> easier done in shell anyway).
> What are other folks' thoughts on the matter? Would anyone object to calling
> system() as part of the kinit process?
I guess the first thing I have to ask is why it can't simply be handled
by invoking something before kinit is run, but I don't have any
fundamental objections to calling system() or execvp() -- if there are
no scripts, one can simply omit the shell, too.
More information about the klibc