From: Harald Hoyer Date: Fri, 1 Aug 2014 11:15:05 +0000 (+0200) Subject: TEST-20-NFS:client-init.sh: add shell on rd.shell X-Git-Tag: 039~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28d03673f9aa76b041ce9a41a82a632d5399d8d1;p=thirdparty%2Fdracut.git TEST-20-NFS:client-init.sh: add shell on rd.shell --- diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh index a16db3ceb..a1c45909e 100755 --- a/test/TEST-20-NFS/client-init.sh +++ b/test/TEST-20-NFS/client-init.sh @@ -7,14 +7,18 @@ CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) strstr() { [ "${1##*"$2"*}" != "$1" ]; } stty sane -strstr "$CMDLINE" "rd.shell" && sh -i +if strstr "$CMDLINE" "rd.shell"; then + [ -c /dev/watchdog ] && echo -n 'V' > /dev/watchdog + strstr "$(setsid --help)" "control" && CTTY="-c" + setsid $CTTY sh -i +fi + echo "made it to the rootfs! Powering down." + while read dev fs fstype opts rest; do [ "$fstype" != "nfs" -a "$fstype" != "nfs4" ] && continue echo "nfs-OK $dev $fstype $opts" > /dev/sda break done < /proc/mounts -#echo 'V' > /dev/watchdog -#sh -i >/dev/watchdog poweroff -f