]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: split "made it to the rootfs" from "Powering down."
authorBenjamin Drung <benjamin.drung@canonical.com>
Mon, 27 Oct 2025 13:18:25 +0000 (14:18 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Tue, 28 Oct 2025 23:58:04 +0000 (19:58 -0400)
Since the test script does things between reaching the rootfs and
powering down, split those messages.

test/TEST-60-NFS/client-init.sh
test/TEST-70-ISCSI/client-init.sh
test/TEST-71-ISCSI-MULTI/client-init.sh
test/TEST-72-NBD/client-init.sh
test/modules.d/70test-root/test-init.sh

index 1326c572c72b56d30faf87aa4ff2f6550aedb9ec..a6fb2a7faabcb2ef95806596a6b3c76c548e40ab 100755 (executable)
@@ -6,7 +6,7 @@
 export PATH=/usr/sbin:/usr/bin:/sbin:/bin
 exec > /dev/console 2>&1
 
-echo "made it to the rootfs! Powering down."
+echo "made it to the rootfs!"
 
 while read -r dev _ fstype opts rest || [ -n "$dev" ]; do
     [ "$fstype" != "nfs" ] && [ "$fstype" != "nfs4" ] && continue
@@ -43,4 +43,6 @@ fi
 : > /dev/watchdog
 
 sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker2
+
+echo "Powering down."
 poweroff -f
index 6fd0cdcc297a4279bea7c323e08645a44769c85e..edaed9d1ea002ba0e7a27a6657a41dce3fbf876b 100755 (executable)
@@ -3,7 +3,7 @@
 export PATH=/usr/sbin:/usr/bin:/sbin:/bin
 exec > /dev/console 2>&1
 
-echo "made it to the rootfs! Powering down."
+echo "made it to the rootfs!"
 while read -r dev _ fstype opts rest || [ -n "$dev" ]; do
     [ "$fstype" != "ext4" ] && continue
     echo "iscsi-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
@@ -11,4 +11,6 @@ while read -r dev _ fstype opts rest || [ -n "$dev" ]; do
 done < /proc/mounts
 
 sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+
+echo "Powering down."
 poweroff -f
index 6fd0cdcc297a4279bea7c323e08645a44769c85e..edaed9d1ea002ba0e7a27a6657a41dce3fbf876b 100755 (executable)
@@ -3,7 +3,7 @@
 export PATH=/usr/sbin:/usr/bin:/sbin:/bin
 exec > /dev/console 2>&1
 
-echo "made it to the rootfs! Powering down."
+echo "made it to the rootfs!"
 while read -r dev _ fstype opts rest || [ -n "$dev" ]; do
     [ "$fstype" != "ext4" ] && continue
     echo "iscsi-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none
@@ -11,4 +11,6 @@ while read -r dev _ fstype opts rest || [ -n "$dev" ]; do
 done < /proc/mounts
 
 sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+
+echo "Powering down."
 poweroff -f
index 46bcf031d42cacca3a82495f7b91fabf2fe94bac..d0a3c38dc2357357d343f520d0d9f52396e5f317 100755 (executable)
@@ -3,6 +3,7 @@
 
 export PATH=/usr/sbin:/usr/bin:/sbin:/bin
 exec > /dev/console 2>&1
+echo "made it to the rootfs!"
 
 while read -r dev fs fstype opts rest || [ -n "$dev" ]; do
     [ "$dev" = "rootfs" ] && continue
@@ -11,9 +12,10 @@ while read -r dev fs fstype opts rest || [ -n "$dev" ]; do
     echo "nbd-OK $fstype $opts"
     break
 done < /proc/mounts
-echo "made it to the rootfs! Powering down."
 
 mount -n -o remount,ro /
 
 sync /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
+
+echo "Powering down."
 poweroff -f
index 35ea19907895a849ca32d8eaf519b5ec782eed49..1f38c5e9a242451cdc94bcd3948cddc839dc6949 100755 (executable)
@@ -17,6 +17,7 @@ grep -q '^tmpfs /run tmpfs' /proc/self/mounts \
 : > /dev/watchdog
 
 exec > /dev/console 2>&1
+echo "made it to the rootfs!"
 
 if command -v systemctl > /dev/null 2>&1; then
     systemctl --failed --no-legend --no-pager >> /run/failed
@@ -36,7 +37,6 @@ else
     echo "All OK"
 fi
 
-echo "made it to the rootfs!"
 echo "Powering down."
 
 if [ -d /usr/lib/systemd/system ]; then