summaryrefslogtreecommitdiffstats
path: root/modules.d/80test-root/test-init.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:33:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:33:11 +0000
commit203af7302854f453fa4a05ecefd4403b6c8a4f8d (patch)
tree967fdacafe332baabd12b57725505c138d0f3bbf /modules.d/80test-root/test-init.sh
parentAdding upstream version 102. (diff)
downloaddracut-upstream/103.tar.xz
dracut-upstream/103.zip
Adding upstream version 103.upstream/103upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xmodules.d/80test-root/test-init.sh10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules.d/80test-root/test-init.sh b/modules.d/80test-root/test-init.sh
index bd6e485..49116fa 100755
--- a/modules.d/80test-root/test-init.sh
+++ b/modules.d/80test-root/test-init.sh
@@ -18,9 +18,9 @@ grep -q '^tmpfs /run tmpfs' /proc/self/mounts \
exec > /dev/console 2>&1
-if [ -s /failed ]; then
+if [ -s /run/failed ]; then
echo "**************************FAILED**************************"
- cat /failed
+ cat /run/failed
echo "**************************FAILED**************************"
else
echo "dracut-root-block-success" | dd oflag=direct,dsync status=none of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker
@@ -29,8 +29,6 @@ fi
export TERM=linux
export PS1='initramfs-test:\w\$ '
-[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
-[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab
stty sane
echo "made it to the rootfs!"
@@ -38,12 +36,10 @@ echo "made it to the rootfs!"
if getargbool 0 rd.shell; then
strstr "$(setsid --help)" "control" && CTTY="-c"
- # shellcheck disable=SC2086
- setsid $CTTY sh -i
+ setsid ${CTTY:+"${CTTY}"} sh -i
fi
echo "Powering down."
-mount -n -o remount,ro /
if [ -d /run/initramfs/etc ]; then
echo " rd.debug=0 " >> /run/initramfs/etc/cmdline
fi