diff options
Diffstat (limited to 'modules.d/80test-root')
-rwxr-xr-x | modules.d/80test-root/module-setup.sh | 4 | ||||
-rwxr-xr-x | modules.d/80test-root/test-init.sh | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/modules.d/80test-root/module-setup.sh b/modules.d/80test-root/module-setup.sh index 64d618f..c39111c 100755 --- a/modules.d/80test-root/module-setup.sh +++ b/modules.d/80test-root/module-setup.sh @@ -22,9 +22,9 @@ install() { inst_multiple mkdir ln dd stty mount poweroff umount setsid sync for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do - [ -f ${_terminfodir}/l/linux ] && break + [ -f "${_terminfodir}/l/linux" ] && break done - inst_multiple -o ${_terminfodir}/l/linux + inst_multiple -o "${_terminfodir}/l/linux" inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" 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 |