Patchwork [24/24] udev: move /run volatile entry to udev instead of initscripts

login
register
mail settings
Submitter Ross Burton
Date March 26, 2013, 4:50 p.m.
Message ID <a56f9f8d95194dc4365e83488a34f37a4ee0bce1.1364316412.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/46997/
State Accepted
Commit 5b0257e318340c2d6c8d3b0c3fa32272d6e9526b
Headers show

Comments

Ross Burton - March 26, 2013, 4:50 p.m.
initscripts is generally installed on systemd-using images, but because it
specifies that /run is a symlink to /var/run managed by volatiles it totally
breaks systemd by copying/deleting /run from underneath systemd.  Deleting
sockets mid-boot doesn't leave systemd in a happy place.

As this volatile reference of /run was introduced by udev 182, move it's
reference to the udev recipe.  This way it will never be present on systemd
images, as systemd manages /run as a tmpfs itself.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/volatiles |    1 -
 meta/recipes-core/udev/udev.inc                         |    6 +++++-
 meta/recipes-core/udev/udev/volatiles                   |    1 +
 3 files changed, 6 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/udev/udev/volatiles

Patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index f0c796c..270f128 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -35,4 +35,3 @@  f root root 0664 /var/log/wtmp none
 f root root 0664 /var/run/utmp none
 l root root 0644 /etc/resolv.conf /var/run/resolv.conf
 f root root 0644 /var/run/resolv.conf none
-l root root 0755 /run /var/run
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index bd82c34..e358d2d 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -27,7 +27,8 @@  SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://local.rules \
            file://udev-cache \
            file://udev-cache.default \
-           file://init"
+           file://init \
+           file://volatiles"
 
 inherit autotools pkgconfig update-rc.d
 
@@ -81,6 +82,9 @@  do_install_append () {
 	install -d ${D}${sysconfdir}/default
 	install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
 
+	install -d ${D}${sysconfdir}/default/volatiles
+	install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_udev
+
 	touch ${D}${sysconfdir}/udev/cache.data
 
 	install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/recipes-core/udev/udev/volatiles b/meta/recipes-core/udev/udev/volatiles
new file mode 100644
index 0000000..e33561b
--- /dev/null
+++ b/meta/recipes-core/udev/udev/volatiles
@@ -0,0 +1 @@ 
+l root root 0755 /run /var/run