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
2>&1
8 echo "dracut-root-block-success" >/dev
/sdb
10 export PS1
='initramfs-test:\w\$ '
11 [ -f /etc
/mtab
] ||
ln -sfn /proc
/mounts
/etc
/mtab
12 [ -f /etc
/fstab
] ||
ln -sfn /proc
/mounts
/etc
/fstab
14 echo "made it to the rootfs!"
15 if strstr
"$CMDLINE" "rd.shell"; then
16 strstr
"$(setsid --help)" "control" && CTTY
="-c"
20 mount
-n -o remount
,ro
/