TEST-20-NFS: get shell in test root for rd.shell

master
Harald Hoyer 2012-04-02 09:03:25 +02:00
parent 078acb598b
commit fc87119069
1 changed files with 4 additions and 0 deletions

View File

@ -3,7 +3,11 @@ export PATH=/sbin:/bin:/usr/sbin:/usr/bin
exec >/dev/console 2>&1 exec >/dev/console 2>&1
export TERM=linux export TERM=linux
export PS1='initramfs-test:\w\$ ' export PS1='initramfs-test:\w\$ '
CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
strstr() { [ "${1#*$2*}" != "$1" ]; }

stty sane stty sane
strstr "$CMDLINE" "rd.shell" && sh -i
echo "made it to the rootfs! Powering down." echo "made it to the rootfs! Powering down."
while read dev fs fstype opts rest; do while read dev fs fstype opts rest; do
[ "$fstype" != "nfs" -a "$fstype" != "nfs4" ] && continue [ "$fstype" != "nfs" -a "$fstype" != "nfs4" ] && continue