aboutsummaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-03-29 04:08:02 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-03-29 04:08:02 +0000
commitd034140299dd7fbe13e7ce9633ab18bd818c1c1b (patch)
tree289b38030bdb4a274a123b95e2b5cab53b2f23d7 /layout
parent2a4c22df58a22bb765145b7c7e75b53645a96f3c (diff)
downloadlh-bootstrap-d034140299dd7fbe13e7ce9633ab18bd818c1c1b.tar.xz
Change initramfs to accommodate new mdevd
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 }