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

login
register
mail settings
Submitter Anders Darander
Date Jan. 10, 2014, 7:15 a.m.
Message ID <66484b0f9b20980f5e45f01aba5eeec8c24a974f.1389338076.git.anders@chargestorm.se>
Download mbox | patch
Permalink /patch/64511/
State New
Headers show

Comments

Anders Darander - Jan. 10, 2014, 7:15 a.m.
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...

Signed-off-by: Anders Darander <anders@chargestorm.se>
---
 meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Ross Burton - Jan. 13, 2014, 5:02 p.m.
If dnsmasq doesn't need to be manually masked, then why not just
remove it from the list?

Ross

On 10 January 2014 07:15, Anders Darander <anders@chargestorm.se> wrote:
> 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...
>
> Signed-off-by: Anders Darander <anders@chargestorm.se>
> ---
>  meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
> index 9f28283..e32ad79 100644
> --- a/meta/recipes-core/systemd/systemd-compat-units.bb
> +++ b/meta/recipes-core/systemd/systemd-compat-units.bb
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index 9f28283..e32ad79 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -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