aboutsummaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
Diffstat (limited to 'layout')
-rw-r--r--layout/initramfs/bin/.empty0
-rwxr-xr-xlayout/initramfs/init16
2 files changed, 14 insertions, 2 deletions
diff --git a/layout/initramfs/bin/.empty b/layout/initramfs/bin/.empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layout/initramfs/bin/.empty
diff --git a/layout/initramfs/init b/layout/initramfs/init
index 7c4c681..e34ff9f 100755
--- a/layout/initramfs/init
+++ b/layout/initramfs/init
@@ -4,7 +4,7 @@
# Since our rootfs shouldn't require a coldplug to be found,
# we could do away with the initramfs, but we leave it as an example.
-/command/export PATH /command
+/command/export PATH /command:/bin
/command/cd /
if { s6-echo "\n initramfs (minimal)\n" }
@@ -12,7 +12,19 @@ if { s6-mount -wt sysfs sys /sys }
if { s6-mount -wt proc proc /proc }
if { s6-mount -wt devtmpfs dev /dev }
-if { pipeline { mdevd-coldplug } mdevd }
+
+piperw 4 5
+background
+{
+ fdclose 4
+ mdevd -D 5
+}
+importas -u MDEVDPID !
+fdclose 5
+if -n { fdmove 0 4 forstdin -x 1 -- i exit 1 } # readiness notif.
+fdclose 4
+if { mdevd-coldplug }
+if { kill $MDEVDPID }
if { s6-mount -rt ext4 /dev/%%PARTITION%%1 /rootfs }