PATCH: removing hardcoded paths from init

Luciano Miguel Ferreira Rocha strange at nsk.no-ip.org
Mon Jan 15 23:32:17 UTC 2007


On Mon, Jan 15, 2007 at 06:02:45PM -0500, Gabriel L. Somlo wrote:
> I noticed there are a bunch of places in init/init.c where hard-coded
> commands are passed to new_init_action(). Things such as "/sbin/reboot",
> "/bin/umount", "/sbin/swapon", etc.
> 
> The following patch allows the use of path-less commands by making
> new_init_action() call a new function, resolve_command(), which adds
> the appropriate prefix to a command, based on where it is found in
> $PATH.

Why the relutance to use the exec*p family? Also, what's the kernel
default PATH? init=/bin/bash doesn't include */sbin, though bash may be
resetting PATH.

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070115/de868cc9/attachment-0002.pgp 


More information about the busybox mailing list