]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
TEST-01-BASIC: add setsid
authorHarald Hoyer <harald@redhat.com>
Wed, 14 Mar 2012 15:32:19 +0000 (16:32 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 14 Mar 2012 15:32:19 +0000 (16:32 +0100)
test/TEST-01-BASIC/test-init.sh
test/TEST-01-BASIC/test.sh

index fd03aa5cf1706993bbf17b58927a3448bcf21528..f8d66934a6df6f4793d13eff3d06c10d753c00e9 100755 (executable)
@@ -11,7 +11,10 @@ export PS1='initramfs-test:\w\$ '
 [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab
 stty sane
 echo "made it to the rootfs!"
-strstr "$CMDLINE" "rd.shell" && sh -i
+if strstr "$CMDLINE" "rd.shell"; then
+       strstr "$(setsid --help)" "control" && CTTY="-c"
+       setsid $CTTY sh -i
+fi
 echo "Powering down."
 mount -n -o remount,ro /
 poweroff -f
index ca7a1fe1d30bc0c151c86d722acdb79d6f4583b2..61871441df0710ad65147637013b44eb8ae73f35 100755 (executable)
@@ -29,7 +29,7 @@ test_setup() {
        . $basedir/dracut-functions.sh
        dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
            mount dmesg ifconfig dhclient mkdir cp ping dhclient \
-           umount strace less
+           umount strace less setsid
        for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
        done