Skip to contentSkip to conversation

systemd-compat-units: do not mask real service files

PATCH In review Anders Darander 2 participants 3 messages Jan 10, 2014 – Jan 13, 2014

lore
Share & tools
lore
#0 lore raw

cover systemd-compat-units: do not mask real service files

systemd-compat-units might mask existing service files.
This occuress if real service files mentioned in SYSTEMD_DISABLED_SYSV_SERVICES exists in systemd_unitdir/system instead of /etc/systemd/system.

This was discovered when adding dnsmasq to our dora-based builds. The fix itself is ported to master.
The following changes since commit 1028ac813fa9803ebfff6bcfa7f8b67012609b27:

sstate: add do_package to the noexec list in setscene_depvalid (2014-01-07 13:58:28 +0000)

are available in the git repository at:

git://github.com/darander/oe-core systemd-compat-units
https://github.com/darander/oe-core/tree/systemd-compat-units

Anders Darander (1):
systemd-compat-units: do not mask available services

 meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.8.5.2
#1 lore raw

PATCH 1/1 systemd-compat-units: do not mask available services

Do also check systemd_unitdir/system/ for available unit files.

This was hiding dnsmasq.service for us, as /etc/systemd/system has priority over systemd_unitdir/system...

---
 meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-compat-units.bb +1 -1
index 9f28283..e32ad79 100644
@@ -42,7 +42,7 @@ pkg_postinst_${PN} () {
 	fi
 
 	for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
-		if [ \( -e $i -o $i.sh \) -a ! -e $D${sysconfdir}/systemd/system/$i.service ] ; then
+		if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o  -e $D${systemd_unitdir}/system/$i.service \) ] ; then
 			echo -n "$i: " ; systemctl ${OPTS} mask $i.service
 		fi
 	done ; echo
Signature · 1 line
1.8.5.2
#2 lore raw

Re: [PATCH 1/1] systemd-compat-units: do not mask available services

If dnsmasq doesn't need to be manually masked, then why not just remove it from the list?

Ross

Quoted 30 lines · Anders Darander

Do also check systemd_unitdir/system/ for available unit files.

This was hiding dnsmasq.service for us, as /etc/systemd/system has priority over systemd_unitdir/system...

---
 meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-compat-units.bb +1 -2
index 9f28283..e32ad79 100644
@@ -42,7 +42,7 @@ pkg_postinst_${PN} () {
        fi
 
        for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
-               if [ \( -e $i -o $i.sh \) -a ! -e $D${sysconfdir}/systemd/system/$i.service ] ; then
+               if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o  -e $D${systemd_unitdir}/system/$i.service \) ] ; then
                        echo -n "$i: " ; systemctl ${OPTS} mask $i.service
                fi
        done ; echo
--

1.8.5.2

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core