]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: use dd to write status to marker disk
authorHarald Hoyer <harald@redhat.com>
Fri, 28 Feb 2020 12:39:05 +0000 (13:39 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 28 Feb 2020 13:41:15 +0000 (14:41 +0100)
50 files changed:
test/TEST-01-BASIC/create-root.sh
test/TEST-01-BASIC/test-init.sh
test/TEST-01-BASIC/test.sh
test/TEST-02-SYSTEMD/create-root.sh
test/TEST-02-SYSTEMD/test-init.sh
test/TEST-02-SYSTEMD/test.sh
test/TEST-03-USR-MOUNT/create-root.sh
test/TEST-03-USR-MOUNT/test-init.sh
test/TEST-03-USR-MOUNT/test.sh
test/TEST-04-FULL-SYSTEMD/create-root.sh
test/TEST-04-FULL-SYSTEMD/test-init.sh
test/TEST-04-FULL-SYSTEMD/test.sh
test/TEST-10-RAID/create-root.sh
test/TEST-10-RAID/test-init.sh
test/TEST-10-RAID/test.sh
test/TEST-11-LVM/create-root.sh
test/TEST-11-LVM/test-init.sh
test/TEST-11-LVM/test.sh
test/TEST-12-RAID-DEG/create-root.sh
test/TEST-12-RAID-DEG/test-init.sh
test/TEST-12-RAID-DEG/test.sh
test/TEST-13-ENC-RAID-LVM/create-root.sh
test/TEST-13-ENC-RAID-LVM/test-init.sh
test/TEST-13-ENC-RAID-LVM/test.sh
test/TEST-14-IMSM/create-root.sh
test/TEST-14-IMSM/test-init.sh
test/TEST-14-IMSM/test.sh
test/TEST-15-BTRFSRAID/create-root.sh
test/TEST-15-BTRFSRAID/test-init.sh
test/TEST-15-BTRFSRAID/test.sh
test/TEST-16-DMSQUASH/test-init.sh
test/TEST-16-DMSQUASH/test.sh
test/TEST-17-LVM-THIN/create-root.sh
test/TEST-17-LVM-THIN/test-init.sh
test/TEST-17-LVM-THIN/test.sh
test/TEST-20-NFS/client-init.sh
test/TEST-20-NFS/test.sh
test/TEST-30-ISCSI/client-init.sh
test/TEST-30-ISCSI/create-root.sh
test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/client-init.sh
test/TEST-35-ISCSI-MULTI/create-root.sh
test/TEST-35-ISCSI-MULTI/test.sh
test/TEST-40-NBD/client-init.sh
test/TEST-40-NBD/create-root.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/client-init.sh
test/TEST-50-MULTINIC/test.sh
test/TEST-60-BONDBRIDGEVLANIFCFG/client-init.sh
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh

index 8b28c30985170d759a970bf84e532064d02622f7..97071fa356dabccb21f33dd4d9f8fdc2a852136f 100755 (executable)
@@ -19,7 +19,7 @@ mount /dev/sda2 /root
 cp -a -t /root /source/*
 mkdir -p /root/run
 umount /root
-echo "dracut-root-block-created" >/dev/sda1
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 sync
 poweroff -f
 
index 78f124a5b26572cf7646288821e5e211d2cf0294..07fd0ed488976fe5f5cc06f2d16a75ef9479edf4 100755 (executable)
@@ -100,7 +100,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sdb
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdb
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index 37f77c3652fec942bd2900857d2385138a89d76b..c47098eaf9f9e910af5b51b63a0c733d7850a375 100755 (executable)
@@ -38,7 +38,7 @@ test_setup() {
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
                       mount dmesg dhclient mkdir cp ping dhclient \
-                      umount strace less setsid
+                      umount strace less setsid dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -57,7 +57,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.ext3 poweroff cp umount sync
+        inst_multiple sfdisk mkfs.ext3 poweroff cp umount sync dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -85,7 +85,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 0e60e7422cdd2a26d6127e252d3e316740f86192..457a74bb0c3cab093b1ba18d1e475ac9b68cefcc 100755 (executable)
@@ -19,6 +19,6 @@ mount /dev/sda2 /root
 cp -a -t /root /source/*
 mkdir -p /root/run
 umount /root
-echo "dracut-root-block-created" >/dev/sda1
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 poweroff -f
 
index 63fd58f7f353eccdf1e5d08bdffec40cab1f1d92..66bd1c3ad8de9548ed7637abb3f868dbd7bf2ab5 100755 (executable)
@@ -102,7 +102,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 
 plymouth --quit
 exec </dev/console >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda1
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index a08bfe5ce204c95ea1fcfb3d635fb10e23ca5e8f..cf1fcaa52326655e774d465dec402ccd7e9a17bd 100755 (executable)
@@ -35,7 +35,7 @@ test_setup() {
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
                       mount dmesg dhclient mkdir cp ping dhclient \
-                      umount strace less setsid systemd-analyze
+                      umount strace less setsid systemd-analyze dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -54,7 +54,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.ext3 poweroff cp umount
+        inst_multiple sfdisk mkfs.ext3 poweroff cp umount dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -82,7 +82,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook pre-pivot 000 ./systemd-analyze.sh
         inst_hook emergency 000 ./hard-off.sh
index 478d5ef4d5a98d03a4bbda2f231616f7fc4c7068..238fad06a0da4c7810627817446c0d445134feb1 100755 (executable)
@@ -37,7 +37,7 @@ btrfs filesystem sync /root/usr
 btrfs filesystem sync /root
 umount /root/usr
 umount /root
-echo "dracut-root-block-created" >/dev/sda1
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 udevadm settle
 sync
 poweroff -f
index dc03359a57aafda8129172be38ad0c0889323a03..d49372f684d581d9ef04f1507768806d8c8eb26f 100755 (executable)
@@ -109,7 +109,7 @@ ismounted() {
 }
 
 if ismounted /usr; then
-    echo "dracut-root-block-success" >/dev/sdc
+    echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdc
 fi
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
index 5943c5c6067be272ee34c75a3203e646ae4e6b0b..cdf71838e40a2a61aa80876cbd3142ce30a2ad35 100755 (executable)
@@ -65,7 +65,7 @@ test_setup() {
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
                       mount dmesg dhclient mkdir cp ping dhclient \
-                      umount strace less setsid
+                      umount strace less setsid dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -85,7 +85,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync
+        inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -122,7 +122,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index a9f5ac5220bc47b410e44d0925c0cd6bf654318d..d89c64943077ff964514870c40a4242dc8d577c4 100755 (executable)
@@ -38,7 +38,7 @@ btrfs filesystem sync /root/usr
 btrfs filesystem sync /root
 umount /root/usr
 umount /root
-echo "dracut-root-block-created" >/dev/sda1
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 sync
 poweroff -f
 
index e40f5e6f3048a315acc6775e317ee52c1d95ea64..687522b90e08fca059cf61905140592aa4b858fa 100755 (executable)
@@ -111,7 +111,7 @@ ismounted() {
 systemctl --failed --no-legend --no-pager > /failed
 
 if ismounted /usr && [ ! -s /failed ]; then
-    echo "dracut-root-block-success" >/dev/sdc
+    echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdc
 fi
 
 if ! ismounted /usr; then
index 4114070a3b357629b460b31ad674eecffb6d1c6f..a7b996000f55edd9bb600a6637fc45394e221edd 100755 (executable)
@@ -69,7 +69,7 @@ test_setup() {
         ln -sfn /run/lock "$initdir/var/lock"
 
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg mkdir cp ping \
+                      mount dmesg mkdir cp ping dd \
                       umount strace less setsid tree systemctl reset
 
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -227,7 +227,7 @@ EOF
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync
+        inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -260,7 +260,7 @@ EOF
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index af4cac0d9f6533a421b23c933d5862e033c70d8c..e7bb3ef9e1fa1e6f6987c2b85b8939d3274d96ec 100755 (executable)
@@ -36,5 +36,5 @@ udevadm settle
 cryptsetup luksClose /dev/mapper/dracut_crypt_test
 udevadm settle
 eval $(udevadm info --query=env --name=/dev/md0|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
-{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } >/dev/sda1
+{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } | dd oflag=direct,dsync of=/dev/sda1
 poweroff -f
index 5ca9de15b1ddf30ab1879fec26ac5bcec01e5038..1d9c9a8862d935ba6045aa77582b2b305c350253 100755 (executable)
@@ -99,7 +99,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 command -v plymouth >/dev/null && plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda1
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index fd92606b447c6707665c1733389771fdbfd08034..981c1b9d4e5231993d2904e25b4dba7bf66b0fc0 100755 (executable)
@@ -35,7 +35,7 @@ test_setup() {
             done
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient
+                      mount dmesg dhclient mkdir cp ping dhclient dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -55,7 +55,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mke2fs poweroff cp umount
+        inst_multiple sfdisk mke2fs poweroff cp umount dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -82,7 +82,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst ./cryptroot-ask.sh /sbin/cryptroot-ask
index 5d7443fd2dda0333acca8530b5e2bd53a877c3ca..7fbef295e2868c24de938d39f16bfe14df83df5b 100755 (executable)
@@ -27,5 +27,5 @@ umount /sysroot && \
 sleep 1 && \
 lvm lvchange -a n /dev/dracut/root && \
 sleep 1 && \
-echo "dracut-root-block-created" >/dev/sda1
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 poweroff -f
index 00d9da7778a8dcf82ff4fe2372c524fc99e484a6..975bfece3dc669c5c0031deaf5ff80a82aaca9f4 100755 (executable)
@@ -99,7 +99,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda1
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index 95463e4b8b765b8046c34268d68ad7df3900a233..c718ad57d76aa9c8eee2083b8331ebb4d59de389 100755 (executable)
@@ -33,7 +33,7 @@ test_setup() {
             mkdir -p -- var/lib/nfs/rpc_pipefs
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient
+                      mount dmesg dhclient mkdir cp ping dhclient dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -53,7 +53,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mke2fs poweroff cp umount
+        inst_multiple sfdisk mke2fs poweroff cp umount dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -76,7 +76,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index df4f619daa81863ef293dc31486dcbf8e82e5248..31be41d1429b6876bfd070ec4cf743eccd9be255 100755 (executable)
@@ -45,4 +45,4 @@ mdadm -W /dev/md0 || :
 mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
 . /tmp/mduuid
 eval $(udevadm info --query=env --name=/dev/md0|while read line || [ -n "$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
+{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;  echo "ID_FS_UUID=$ID_FS_UUID";} | dd oflag=direct,dsync of=/dev/sda1
index 5ca9de15b1ddf30ab1879fec26ac5bcec01e5038..1d9c9a8862d935ba6045aa77582b2b305c350253 100755 (executable)
@@ -99,7 +99,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 command -v plymouth >/dev/null && plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda1
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index d6b29ddec6697dca815776805009fadc17dcd43d..2f3d72a8aa5c4aed57500df1a01375f47a114a46 100755 (executable)
@@ -75,7 +75,7 @@ test_setup() {
             done
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient
+                      mount dmesg dhclient mkdir cp ping dhclient dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -126,7 +126,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 13e65838d956573968dfd98e23aa1cdeaf3c7ad0..437f0fb29187c2e4443fe11dc9d351170e8c355f 100755 (executable)
@@ -51,5 +51,5 @@ cryptsetup luksClose /dev/mapper/dracut_sda4 && \
     for i in /dev/sda[234]; do
        udevadm info --query=env --name=$i|grep -F 'ID_FS_UUID='
     done
-} >/dev/sda1
+} | dd oflag=direct,dsync of=/dev/sda1
 poweroff -f
index 6b86561fbdf363a4225f66db003a213187bd193a..07d245a73bdb32fcb5a20f31f7ea1df5fd4d1773 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sdb
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdb
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab
index 1f311be5250549b797e9487b6c365b0db6c37990..580ade85e837a39f52e82c9e76dea927d7684675 100755 (executable)
@@ -67,7 +67,7 @@ test_setup() {
             mkdir -p -- var/lib/nfs/rpc_pipefs
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient
+                      mount dmesg dhclient mkdir cp ping dhclient dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -86,7 +86,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mke2fs poweroff cp umount grep
+        inst_multiple sfdisk mke2fs poweroff cp umount grep dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
@@ -116,7 +116,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 0d10945b1cec3842272a2aeb3b5d5e7aa66b2ab0..9b6517fb8e3500b951e0f84576ce47f708006903 100755 (executable)
@@ -73,5 +73,5 @@ udevadm settle
 mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
 . /tmp/mduuid
 echo "MD_UUID=$MD_UUID"
-{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} /dev/sda
+{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} | dd oflag=direct,dsync of=/dev/sda
 mdadm --wait-clean /dev/md0
index 01cbe961e6ece8473e6fe7bb40c20eafa5871e25..d82657ad2c7b8ec4eff6ec9cb2035f126056ead2 100755 (executable)
@@ -99,7 +99,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 cat /proc/mdstat
index 75ea587f847951868cfb08e59dc19f56de399601..51c26e817b43a7d7763d0b4fef083a3dd5200efc 100755 (executable)
@@ -67,7 +67,7 @@ test_setup() {
             done
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient
+                      mount dmesg dhclient mkdir cp ping dhclient dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -87,7 +87,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mke2fs poweroff cp umount grep
+        inst_multiple sfdisk mke2fs poweroff cp umount grep dd
         inst_hook initqueue 01 ./create-root.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
     )
index e95e57da89d4afcf85c9bef5f979c1049e5b6123..4d0bf2eb26cc814956cd702ab53485b2c1bb34d2 100755 (executable)
@@ -23,5 +23,5 @@ mkdir -p /sysroot
 mount -t btrfs /dev/sda5 /sysroot
 cp -a -t /sysroot /source/*
 umount /sysroot
-echo "dracut-root-block-created" >/dev/sda1
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 poweroff -f
index ed66a2b3555b227aea1eb8999ff9f7f26b1dc7e9..5632872779a761d2363f63c748e4a6af5f7be59c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda
 sync
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
index 873b779a7d4c72b294c286a4a04c79cdb3e1dbd7..435e52be220a6f90bd0b77a6a3f0fa17148fab7b 100755 (executable)
@@ -38,7 +38,7 @@ test_setup() {
             mkdir -p -- var/lib/nfs/rpc_pipefs
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient sync
+                      mount dmesg dhclient mkdir cp ping dhclient sync dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -57,7 +57,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.btrfs poweroff cp umount
+        inst_multiple sfdisk mkfs.btrfs poweroff cp umount dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 3a93c8023753cf9f51ccc09c4deba8da4c7c5279..4a9c814b81838888878a76b235111e1188b9a935 100755 (executable)
@@ -99,7 +99,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sdb
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdb
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index 37a963e2bf7992e6d05993a2ab628070aaab8921..def97e27101a3cfd180fd6995787324dc5a9cd6a 100755 (executable)
@@ -73,7 +73,7 @@ test_setup() {
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
                       mount dmesg dhclient mkdir cp ping dhclient \
-                      umount strace less
+                      umount strace less dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [[ -f ${_terminfodir}/l/linux ]] && break
         done
index 6e09012e2599f232ddbe7dbf308cf28026dd689a..01f0a1191b3c612523a99b0e4dd6f141c6d6f8ca 100755 (executable)
@@ -29,5 +29,5 @@ sleep 1 && \
 lvm lvchange -a n /dev/dracut/root && \
 sleep 1
 dmsetup status |grep out_of_data_space || \
-    echo "dracut-root-block-created" >/dev/sda1
+    echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
 poweroff -f
index cb9d921d6c30fe22415f1293b7a958155b80ff6f..ef867ab925de8131bd11b0aed7346139006a6ead 100755 (executable)
@@ -99,7 +99,7 @@ strstr() { [ "${1##*"$2"*}" != "$1" ]; }
 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
 plymouth --quit
 exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
+echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sda1
 export TERM=linux
 export PS1='initramfs-test:\w\$ '
 [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
index fb7b817c3a4eef3a2d4320fbfa5970a9440b27c2..e4755f7881c72394773ba84c971cddf92edec363 100755 (executable)
@@ -33,7 +33,7 @@ test_setup() {
             mkdir -p -- var/lib/nfs/rpc_pipefs
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg dhclient mkdir cp ping dhclient
+                      mount dmesg dhclient mkdir cp ping dhclient dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -53,7 +53,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup
+        inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 55762d1eef3bcaa4d61259b472a235a6934b5264..127555a991ca52dccb0cb3133f08a4a1bdb14c3d 100755 (executable)
@@ -112,7 +112,7 @@ echo "made it to the rootfs! Powering down."
 
 while read dev fs fstype opts rest || [ -n "$dev" ]; do
     [ "$fstype" != "nfs" -a "$fstype" != "nfs4" ] && continue
-    echo "nfs-OK $dev $fstype $opts" /dev/sda
+    echo "nfs-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/sda
     break
 done < /proc/mounts
 >/dev/watchdog
index 27c90d5e8fc9a5cc5466005c6a6ca3321e0de467..9d5493c7276306369c2e9423279087474bc46621 100755 (executable)
@@ -305,7 +305,7 @@ test_setup() {
         export initdir=$TESTDIR/mnt/nfs/client
         . $basedir/dracut-init.sh
 
-        inst_multiple sh shutdown poweroff stty cat ps ln ip \
+        inst_multiple sh shutdown poweroff stty cat ps ln ip dd \
                       mount dmesg mkdir cp ping grep setsid ls vi /etc/virc less cat
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
index 7a5b7546d6e8f6095ef1bf0dc927928af6c3adc8..a659f148e02f8ba4cd58a322716ed07d2650cabd 100755 (executable)
@@ -104,7 +104,7 @@ stty sane
 echo "made it to the rootfs! Powering down."
 while read dev fs fstype opts rest || [ -n "$dev" ]; do
     [ "$fstype" != "ext3" ] && continue
-    echo "iscsi-OK $dev $fstype $opts" /dev/sda
+    echo "iscsi-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/sda
     break
 done < /proc/mounts
 #sh -i
index 5f4b32a2c285b44532e457bf27edb7e05ab922f5..d44c35762024355e9232f813d4bde7643ab7f4b6 100755 (executable)
@@ -21,5 +21,5 @@ mount /dev/dracut/root /sysroot && \
 cp -a -t /sysroot /source/* && \
 umount /sysroot && \
 lvm lvchange -a n /dev/dracut/root && \
-echo "dracut-root-block-created" >/dev/sdb
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sdb
 poweroff -f
index 8c7e9452796ca57a2f9fdaa5564962956c9fb61e..a8aee221125e452fb6b837d3b2db3ca739e1b5f2 100755 (executable)
@@ -149,7 +149,7 @@ test_setup() {
             mkdir -p -- var/lib/nfs/rpc_pipefs
         )
         inst_multiple sh shutdown poweroff stty cat ps ln ip \
-                      mount dmesg mkdir cp ping grep setsid
+                      mount dmesg mkdir cp ping grep setsid dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -164,7 +164,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid
+        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 7a5b7546d6e8f6095ef1bf0dc927928af6c3adc8..a659f148e02f8ba4cd58a322716ed07d2650cabd 100755 (executable)
@@ -104,7 +104,7 @@ stty sane
 echo "made it to the rootfs! Powering down."
 while read dev fs fstype opts rest || [ -n "$dev" ]; do
     [ "$fstype" != "ext3" ] && continue
-    echo "iscsi-OK $dev $fstype $opts" /dev/sda
+    echo "iscsi-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/sda
     break
 done < /proc/mounts
 #sh -i
index 5f4b32a2c285b44532e457bf27edb7e05ab922f5..d44c35762024355e9232f813d4bde7643ab7f4b6 100755 (executable)
@@ -21,5 +21,5 @@ mount /dev/dracut/root /sysroot && \
 cp -a -t /sysroot /source/* && \
 umount /sysroot && \
 lvm lvchange -a n /dev/dracut/root && \
-echo "dracut-root-block-created" >/dev/sdb
+echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sdb
 poweroff -f
index 0c40e55c70cdff43fbd24c77c688b9506cf01921..e96c9c566b5a67b4742031d6a315e4906e607eae 100755 (executable)
@@ -164,7 +164,7 @@ test_setup() {
             mkdir -p -- var/lib/nfs/rpc_pipefs
         )
         inst_multiple sh shutdown poweroff stty cat ps ln ip \
-                      mount dmesg mkdir cp ping grep setsid
+                      mount dmesg mkdir cp ping grep setsid dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -179,7 +179,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid
+        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid dd
         inst_hook initqueue 01 ./create-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index 2b42e21b5a3a75ffe5bbcba636160d787453fc61..6292501ab16ad77de75c9ff6f34d0d6363c44a30 100755 (executable)
@@ -5,7 +5,7 @@ exec >/dev/console 2>&1
 while read dev fs fstype opts rest || [ -n "$dev" ]; do
     [ "$dev" = "rootfs" ] && continue
     [ "$fs" != "/" ] && continue
-    echo "nbd-OK $fstype $opts" >/dev/sda
+    echo "nbd-OK $fstype $opts" | dd oflag=direct,dsync of=/dev/sda
     echo "nbd-OK $fstype $opts" 
     break
 done < /proc/mounts
index 20d0effd9f54300abf64e18b66fd33a0b97fc454..c57bf7f4f88e03198cd0ab20c4a193eaa77df6ce 100755 (executable)
@@ -26,5 +26,5 @@ cryptsetup luksClose /dev/mapper/dracut_crypt_test
 udevadm settle
 sleep 1
 eval $(udevadm info --query=env --name=/dev/sdb|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
-{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } >/dev/sda
+{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } | dd oflag=direct,dsync of=/dev/sda
 poweroff -f
index 75820cbb7ea7d92022d98d56258b064735012a2e..f06c36c3ec69016e52674180cad6d0ccb12ef0b1 100755 (executable)
@@ -227,7 +227,7 @@ make_encrypted_root() {
             ln -s ../run var/run
         )
         inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
-                      mount dmesg mkdir cp ping
+                      mount dmesg mkdir cp ping dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -251,7 +251,7 @@ make_encrypted_root() {
             done
             ln -s ../run var/run
         )
-        inst_multiple mke2fs poweroff cp umount tune2fs
+        inst_multiple mke2fs poweroff cp umount tune2fs dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_hook emergency 000 ./hard-off.sh
         inst_hook initqueue 01 ./create-root.sh
@@ -302,7 +302,7 @@ make_client_root() {
             ln -s ../run var/run
         )
         inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
-                      dmesg mkdir cp ping
+                      dmesg mkdir cp ping dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [ -f ${_terminfodir}/l/linux ] && break
         done
@@ -390,7 +390,7 @@ test_setup() {
     (
         export initdir=$TESTDIR/overlay
         . $basedir/dracut-init.sh
-        inst_multiple poweroff shutdown
+        inst_multiple poweroff shutdown dd
         inst_hook shutdown-emergency 000 ./hard-off.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
         inst ./cryptroot-ask.sh /sbin/cryptroot-ask
index 518f00fcb4ef0efd311ddfc91a4298a28bdb3b98..38879049c9642a312bc2c5985de5fb777e5dd18e 100755 (executable)
@@ -124,7 +124,7 @@ done
 {
     echo "OK"
     echo "$IFACES"
-} /dev/sda
+} | dd oflag=direct,dsync of=/dev/sda
 
 getargbool 0 rd.shell && sh -i
 poweroff -f
index 14f6b6b76b2760b36c541484a7d09867cff00a6d..b4326d5af1a587f50dcd4d697f726e9088cf65ea 100755 (executable)
@@ -257,7 +257,7 @@ test_setup() {
             done
         )
         inst_multiple sh shutdown poweroff stty cat ps ln ip \
-                      mount dmesg mkdir cp ping grep ls
+                      mount dmesg mkdir cp ping grep ls dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [[ -f ${_terminfodir}/l/linux ]] && break
         done
index 269355576720554be1c6c2233044bddfae96d5cd..13cef7ffa92ea268e50d622c3dc6d9b1bfdeeb45 100755 (executable)
@@ -16,7 +16,7 @@ echo "made it to the rootfs! Powering down."
          grep -v 'UUID=' $i
     done
     echo EOF
-) /dev/sda
+) | dd oflag=direct,dsync of=/dev/sda
 
 strstr "$CMDLINE" "rd.shell" && sh -i
 poweroff -f
index 859b279e678ce08fc995fa119b3f18d67ef54015..72826a5dabcbe5080aa938592c24a63c9796ed86 100755 (executable)
@@ -274,7 +274,7 @@ test_setup() {
         export initdir="$TESTDIR"/mnt/nfs/client
         . "$basedir"/dracut-init.sh
         inst_multiple sh shutdown poweroff stty cat ps ln ip \
-                      mount dmesg mkdir cp ping grep ls sort
+                      mount dmesg mkdir cp ping grep ls sort dd
         for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
             [[ -f ${_terminfodir}/l/linux ]] && break
         done