summaryrefslogtreecommitdiff
path: root/test/TEST-12-RAID-DEG
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-07-30 18:35:30 +0200
committerHarald Hoyer <harald@redhat.com>2012-07-30 20:41:16 +0200
commit3f7e5358e520b3d55c709a675d46c8080070276d (patch)
treec10e329547d7be90709cd812b3be8cce0e2905fa /test/TEST-12-RAID-DEG
parent3d352f522837ce8dc20ae130f79462e5a3cce347 (diff)
downloaddracut-3f7e5358e520b3d55c709a675d46c8080070276d.tar.gz
dracut-3f7e5358e520b3d55c709a675d46c8080070276d.tar.bz2
dracut-3f7e5358e520b3d55c709a675d46c8080070276d.zip
crypt/crypt-run-generator.sh: do not add already existing luks
Diffstat (limited to 'test/TEST-12-RAID-DEG')
-rwxr-xr-xtest/TEST-12-RAID-DEG/create-root.sh3
-rwxr-xr-xtest/TEST-12-RAID-DEG/test.sh6
2 files changed, 8 insertions, 1 deletions
diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh
index 84f5ad27..d5a8c0be 100755
--- a/test/TEST-12-RAID-DEG/create-root.sh
+++ b/test/TEST-12-RAID-DEG/create-root.sh
@@ -41,4 +41,5 @@ udevadm settle
mdadm -W /dev/md0 || :
mdadm --detail --export /dev/md0 |grep MD_UUID > /tmp/mduuid
. /tmp/mduuid
-{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; } > /dev/sda1
+eval $(udevadm info --query=env --name=/dev/md0|while read line; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
+{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; echo "ID_FS_UUID=$ID_FS_UUID";} > /dev/sda1
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
index 96c84f80..558e3b0e 100755
--- a/test/TEST-12-RAID-DEG/test.sh
+++ b/test/TEST-12-RAID-DEG/test.sh
@@ -103,8 +103,11 @@ test_setup() {
-kernel "/boot/vmlinuz-$kernel" \
-append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
+
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
+ eval $(grep -a -m 1 ID_FS_UUID $TESTDIR/root.ext2)
+
(
export initdir=$TESTDIR/overlay
. $basedir/dracut-functions.sh
@@ -114,7 +117,10 @@ test_setup() {
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
mkdir -p $initdir/etc
echo "ARRAY /dev/md0 level=raid5 num-devices=3 UUID=$MD_UUID" > $initdir/etc/mdadm.conf
+ echo "luks-$ID_FS_UUID /dev/md0 /etc/key" > $initdir/etc/crypttab
+ echo -n test > $initdir/etc/key
)
+
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
-o "plymouth network" \
-a "debug" \