From: Harald Hoyer Date: Mon, 11 Apr 2011 15:19:16 +0000 (+0200) Subject: TEST-50-MULTINIC/client-init: drop to shell, if "rd.shell" X-Git-Tag: 011~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06ae51be51117da2f0f1f6559f3187001d97b9d1;p=platform%2Fupstream%2Fdracut.git TEST-50-MULTINIC/client-init: drop to shell, if "rd.shell" --- diff --git a/test/TEST-50-MULTINIC/client-init b/test/TEST-50-MULTINIC/client-init index a65a686..ce5685f 100755 --- a/test/TEST-50-MULTINIC/client-init +++ b/test/TEST-50-MULTINIC/client-init @@ -1,10 +1,13 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin +strstr() { [ "${1#*$2*}" != "$1" ]; } +CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) exec >/dev/console 2>&1 export TERM=linux export PS1='initramfs-test:\w\$ ' stty sane echo "made it to the rootfs! Powering down." -echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda -#sh -i +[ -e /dev/.initramfs/net.ifaces ] && echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda +[ -e /run/initramfs/net.ifaces ] && echo OK $(cat /run/initramfs/net.ifaces) > /dev/sda +strstr "$CMDLINE" "rd.shell" && sh -i poweroff -f