3 while read -r _line ||
[ -n "$_line" ]; do
15 for _o
in $CMDLINE; do
16 if [ "${_o%%=*}" = "${1%%=*}" ]; then
17 if [ -n "${1#*=}" -a "${1#*=*}" != "${1}" ]; then
18 # if $1 has a "=<value>", we want the exact match
19 if [ "$_o" = "$1" ]; then
26 if [ "${_o#*=}" = "$_o" ]; then
27 # if cmdline argument has no "=<value>", we assume "=1"
37 if [ -n "$_val" ]; then
38 [ "x$_doecho" != "x" ] && echo "$_val";
45 local _deprecated _newoption
46 while [ $# -gt 0 ]; do
48 -d) _deprecated
=1; shift;;
49 -y) if _dogetarg
$2 >/dev
/null
; then
50 if [ "$_deprecated" = "1" ]; then
51 [ -n "$_newoption" ] && warn
"Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn
"Option '$2' is deprecated."
58 -n) if _dogetarg
$2 >/dev
/null
; then
60 if [ "$_deprecated" = "1" ]; then
61 [ -n "$_newoption" ] && warn
"Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn
"Option '$2' is deprecated."
67 *) if [ -z "$_newoption" ]; then
71 if [ "$_deprecated" = "1" ]; then
72 [ -n "$_newoption" ] && warn
"Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn
"Option '$1' is deprecated."
89 [ $?
-ne 0 -a -z "$_b" ] && _b
="$_default"
91 [ $_b = "0" ] && return 1
92 [ $_b = "no" ] && return 1
93 [ $_b = "off" ] && return 1
97 export PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
98 exec >/dev
/console
2>&1
99 strstr
() { [ "${1##*"$2"*}" != "$1" ]; }
100 CMDLINE
=$
(while read line ||
[ -n "$line" ]; do echo $line;done < /proc
/cmdline
)
102 export PS1
='initramfs-test:\w\$ '
104 echo "made it to the rootfs! Powering down."
105 while read dev fs fstype opts rest ||
[ -n "$dev" ]; do
106 [ "$fstype" != "ext3" ] && continue
107 echo "iscsi-OK $dev $fstype $opts" |
dd oflag
=direct
,dsync of
=/dev
/sda
111 if getargbool
0 rd.shell
; then
112 strstr
"$(setsid --help)" "control" && CTTY
="-c"