Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] resolvconf: check if running systemd in postinst
@ 2013-07-08 13:31 Jonathan Liu
  2013-07-09 15:15 ` Burton, Ross
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Liu @ 2013-07-08 13:31 UTC (permalink / raw)
  To: openembedded-core

Check if running systemd in postinst by testing for existence of
/sys/fs/cgroup/systemd instead of checking if systemd-tmpfiles
exists in PATH. This is so populate-volatile.sh update is called
instead of systemd-tmpfiles --create if the system has
systemd-tmpfiles installed but was booted using sysvinit.

Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 meta/recipes-connectivity/resolvconf/resolvconf_1.73.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.73.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.73.bb
index ea5b6dd..c8f510b 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.73.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.73.bb
@@ -44,7 +44,7 @@ do_install () {
 
 pkg_postinst_${PN} () {
 	if [ -z "$D" ]; then
-		if command -v systemd-tmpfiles >/dev/null; then
+		if [ -e /sys/fs/cgroup/systemd ]; then
 			systemd-tmpfiles --create
 		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
 			${sysconfdir}/init.d/populate-volatile.sh update
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-09 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08 13:31 [PATCH] resolvconf: check if running systemd in postinst Jonathan Liu
2013-07-09 15:15 ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox