3 export PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
4 strstr
() { [ "${1##*"$2"*}" != "$1" ]; }
5 CMDLINE
=$
(while read line ||
[ -n "$line" ]; do echo $line;done < /proc
/cmdline
)
7 exec </dev
/console
>/dev
/console
2>&1
10 while read a m a ||
[ -n "$m" ]; do
11 [ "$m" = "$1" ] && return 0
16 if ismounted
/usr
; then
17 echo "dracut-root-block-success" >/dev
/sdc
20 export PS1
='initramfs-test:\w\$ '
21 [ -f /etc
/mtab
] ||
ln -sfn /proc
/mounts
/etc
/mtab
22 [ -f /etc
/fstab
] ||
ln -sfn /proc
/mounts
/etc
/fstab
24 echo "made it to the rootfs!"
25 if strstr
"$CMDLINE" "rd.shell"; then
26 strstr
"$(setsid --help)" "control" && CTTY
="-c"
30 mount
-n -o remount
,ro
/