Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jonathan Liu <net147@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] resolvconf: check if running systemd in postinst
Date: Mon,  8 Jul 2013 23:31:41 +1000	[thread overview]
Message-ID: <1373290301-16657-1-git-send-email-net147@gmail.com> (raw)

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



             reply	other threads:[~2013-07-08 13:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08 13:31 Jonathan Liu [this message]
2013-07-09 15:15 ` [PATCH] resolvconf: check if running systemd in postinst Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373290301-16657-1-git-send-email-net147@gmail.com \
    --to=net147@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox