'correct init parsing'

This commit is contained in:
Tobias Powalowski 2009-06-17 13:58:44 +02:00
parent b408ef9afd
commit 9d957af4be

View file

@ -20,8 +20,9 @@ echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
for cmd in ${CMDLINE}; do for cmd in ${CMDLINE}; do
case "${cmd}" in case "${cmd}" in
\#*) break ;; # ignore everything after a # in the commandline \#*) break ;; # ignore everything after a # in the commandline
[0123456Ss]) export runlevel="${cmd}" ;; # The kernel passes those to the kernel on its own
single) export runlevel="S" ;; #some people use 'single' [0123456Ss]) ;;
single) ;;
#Allow "init=X" to pass-through #Allow "init=X" to pass-through
init=*) kinit_params="${kinit_params} ${cmd}" ;; init=*) kinit_params="${kinit_params} ${cmd}" ;;
# only export stuff that does work with dash :) # only export stuff that does work with dash :)
@ -132,5 +133,5 @@ else
/bin/kill -9 ${udevpid} /bin/kill -9 ${udevpid}
/bin/sleep 0.01 /bin/sleep 0.01
fi fi
exec /bin/kinit -- "root=${root}" ${kinit_params} "${runlevel}" > /dev/null 2>&1 exec /bin/kinit "$@" -- "root=${root}" ${kinit_params} > /dev/null 2>&1
fi fi