From: Victor Lowther Date: Sun, 31 May 2009 02:23:55 +0000 (-0500) Subject: Make root on local block device test completly automated. X-Git-Tag: 0.1~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a0c05b849eb0541a9af2a62126fe892a5c6c4a3;p=thirdparty%2Fdracut.git Make root on local block device test completly automated. We no longer require any user intervention when testing dracut on a local block device in qemu, assuming everything passes. If things fail, we still might need to manually kill things. --- diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh index 89f1515a4..2dc9a5940 100755 --- a/test/TEST-10-RAID/create-root.sh +++ b/test/TEST-10-RAID/create-root.sh @@ -18,17 +18,17 @@ mdadm -W /dev/md0 echo -n test >keyfile cryptsetup -q luksFormat /dev/md0 /keyfile echo "The passphrase is test" -cryptsetup luksOpen /dev/md0 dracut_crypt_test /dev/sda1 poweroff -f diff --git a/test/TEST-10-RAID/cryptroot-ask b/test/TEST-10-RAID/cryptroot-ask new file mode 100755 index 000000000..db27c5b88 --- /dev/null +++ b/test/TEST-10-RAID/cryptroot-ask @@ -0,0 +1,6 @@ +#!/bin/sh + +[ -b /dev/mapper/$2 ] && exit 0 +echo -n test >/keyfile +/sbin/cryptsetup luksOpen $1 $2 /dev/console 2>&1 +echo "dracut-root-block-success" >/dev/sda1 export TERM=linux export PS1='initramfs-test:\w\$ ' [ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab stty sane -echo "made it to the rootfs!" -echo 3 >/proc/sys/vm/drop_caches -free -[ -x /bin/plymouth ] && /bin/plymouth quit -sh -i +echo "made it to the rootfs! Powering down." mount -n -o remount,ro / poweroff -f