diff options
Diffstat (limited to 'test/TEST-18-UEFI/test-init.sh')
-rwxr-xr-x | test/TEST-18-UEFI/test-init.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/TEST-18-UEFI/test-init.sh b/test/TEST-18-UEFI/test-init.sh new file mode 100755 index 0000000..03966d2 --- /dev/null +++ b/test/TEST-18-UEFI/test-init.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +export PATH=/usr/sbin:/usr/bin:/sbin:/bin + +[ -e /proc/self/mounts ] \ + || (mkdir -p /proc && mount -t proc -o nosuid,noexec,nodev proc /proc) + +grep -q '^sysfs /sys sysfs' /proc/self/mounts \ + || (mkdir -p /sys && mount -t sysfs -o nosuid,noexec,nodev sysfs /sys) + +grep -q '^devtmpfs /dev devtmpfs' /proc/self/mounts \ + || (mkdir -p /dev && mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev) + +grep -q '^tmpfs /run tmpfs' /proc/self/mounts \ + || (mkdir -p /run && mount -t tmpfs -o mode=755,noexec,nosuid,strictatime tmpfs /run) + +: > /dev/watchdog + +exec > /dev/console 2>&1 + +echo "made it to the rootfs! Powering down." +echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/sdb +poweroff -f |