]>
git.ipfire.org Git - thirdparty/dracut.git/blob - test/TEST-03-USR-MOUNT/test-init.sh
dc03359a57aafda8129172be38ad0c0889323a03
4 while read -r _line ||
[ -n "$_line" ]; do
16 for _o
in $CMDLINE; do
17 if [ "${_o%%=*}" = "${1%%=*}" ]; then
18 if [ -n "${1#*=}" -a "${1#*=*}" != "${1}" ]; then
19 # if $1 has a "=<value>", we want the exact match
20 if [ "$_o" = "$1" ]; then
27 if [ "${_o#*=}" = "$_o" ]; then
28 # if cmdline argument has no "=<value>", we assume "=1"
38 if [ -n "$_val" ]; then
39 [ "x$_doecho" != "x" ] && echo "$_val";
46 local _deprecated _newoption
47 while [ $# -gt 0 ]; do
49 -d) _deprecated
=1; shift;;
50 -y) if _dogetarg
$2 >/dev
/null
; then
51 if [ "$_deprecated" = "1" ]; then
52 [ -n "$_newoption" ] && warn
"Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn
"Option '$2' is deprecated."
59 -n) if _dogetarg
$2 >/dev
/null
; then
61 if [ "$_deprecated" = "1" ]; then
62 [ -n "$_newoption" ] && warn
"Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn
"Option '$2' is deprecated."
68 *) if [ -z "$_newoption" ]; then
72 if [ "$_deprecated" = "1" ]; then
73 [ -n "$_newoption" ] && warn
"Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn
"Option '$1' is deprecated."
90 [ $?
-ne 0 -a -z "$_b" ] && _b
="$_default"
92 [ $_b = "0" ] && return 1
93 [ $_b = "no" ] && return 1
94 [ $_b = "off" ] && return 1
98 export PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
99 strstr
() { [ "${1##*"$2"*}" != "$1" ]; }
100 CMDLINE
=$
(while read line ||
[ -n "$line" ]; do echo $line;done < /proc
/cmdline
)
102 exec </dev
/console
>/dev
/console
2>&1
105 while read a m a ||
[ -n "$m" ]; do
106 [ "$m" = "$1" ] && return 0
111 if ismounted
/usr
; then
112 echo "dracut-root-block-success" >/dev
/sdc
115 export PS1
='initramfs-test:\w\$ '
116 [ -f /etc
/mtab
] ||
ln -sfn /proc
/mounts
/etc
/mtab
117 [ -f /etc
/fstab
] ||
ln -sfn /proc
/mounts
/etc
/fstab
119 echo "made it to the rootfs!"
120 if getargbool
0 rd.shell
; then
121 strstr
"$(setsid --help)" "control" && CTTY
="-c"
124 echo "Powering down."
125 mount
-n -o remount
,ro
/