]> code.ossystems Code Review - openembedded-core.git/commit
busybox: mdev: Ensure /dev/initctl exists after tmpfs mount
authorBen Shelton <ben.shelton@ni.com>
Mon, 21 Jul 2014 16:53:47 +0000 (11:53 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Jul 2014 20:44:20 +0000 (21:44 +0100)
commit53543363a8ab4424c17ed7aec0e8aefc4df86b3d
treea2ff97bf3edd32eaac39ac66227d33960d1a33c7
parent3b256653ae9ab2cf56b21cb82a8bd2a562397b27
busybox: mdev: Ensure /dev/initctl exists after tmpfs mount

During boot, there is a brief window during which /dev/initctl is
missing, which breaks initscripts that would need to access it. This
occurs because /etc/init.d/mountall.sh (rcS.d/S02...) attempts to ensure
/dev/initctl is present, but /etc/init.d/mdev (rcS.d/S06...) mounts over
/dev and clobbers the work done by mountall, and then does not wait
synchronously until initctl is ready before continuing.

To close this window, in /etc/init.d/mdev, we check whether /dev/initctl
is present, and if not, we remove it and recreate it.  This is the same
thing that is done by /etc/init.d/mountall.sh, and we have verified that
any writers of /dev/initctl will wait synchronously until sysvinit
notices the change in fd and does the read, so no race exists.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/files/mdev