]>
git.ipfire.org Git - thirdparty/dracut.git/blob - test/TEST-14-IMSM/test-init.sh
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 strstr
() { [ "${1##*"$2"*}" != "$1" ]; }
99 CMDLINE
=$
(while read line ||
[ -n "$line" ]; do echo $line;done < /proc
/cmdline
)
101 exec >/dev
/console
2>&1
102 echo "dracut-root-block-success" |
dd oflag
=direct
,dsync of
=/dev
/sda
104 export PS1
='initramfs-test:\w\$ '
106 [ -f /etc
/fstab
] ||
ln -s /proc
/mounts
/etc
/fstab
108 echo "made it to the rootfs!"
109 getargbool
0 rd.shell
&& sh
-i
110 echo "Powering down."
111 mount
-n -o remount
,ro
/