* [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
* Re: [PATCH] resolvconf: check if running systemd in postinst
2013-07-08 13:31 [PATCH] resolvconf: check if running systemd in postinst Jonathan Liu
@ 2013-07-09 15:15 ` Burton, Ross
0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2013-07-09 15:15 UTC (permalink / raw)
To: Jonathan Liu; +Cc: openembedded-core
On 8 July 2013 14:31, Jonathan Liu <net147@gmail.com> wrote:
> 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.
So this says to me that having two ways of creating files in volatile
locations is stupid. Should we just split out populate-volatiles from
initscripts into it's own package so it can be used by pure systemd
images, and split out systemd-tmpfiles so it isn't enabled by default?
This patch solves the issue for resolvconf but there are plenty of
other recipes that don't install files/postinst for both
populate-volatile and systemd-tmpfiles.
Ross
^ permalink raw reply [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