From d034140299dd7fbe13e7ce9633ab18bd818c1c1b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 29 Mar 2018 04:08:02 +0000 Subject: Change initramfs to accommodate new mdevd --- layout/initramfs/bin/.empty | 0 layout/initramfs/init | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 layout/initramfs/bin/.empty (limited to 'layout/initramfs') diff --git a/layout/initramfs/bin/.empty b/layout/initramfs/bin/.empty new file mode 100644 index 0000000..e69de29 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 } -- cgit v1.2.3