[Yaird-devel] Bug#416927: Suggested fix
Roderich Schupp
roderich.schupp at googlemail.com
Mon Oct 22 10:03:59 UTC 2007
Hi,
I think I know what's going on wrt run_init:
- run_init uses getopt() to parse its parameters
- getopt() by default reorders argv to move any options to the front
(cf. http://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html#index-getopt-3027)
- hence any kernel boot parameter that starts with "-" (e.g. upstart's
"--debug")
is assumed to be a parameter for run_init
- but run_init only knwos abut "-c" and exits
Two possible ways for fixing this are
(1) call as getopt(..., "+c:") to explicitly prevent it from reordering argv
(2) execute run_init with the kernel boot parameters after "--", e.g.
exec <TMPL_VAR NAME=auxDir>/run_init /mnt $init -- "$@"
Cheers, Roderich
More information about the Yaird-devel
mailing list