[oe-commits] Martin Jansa : systemd-compat-units: use systemctl mask

git at git.openembedded.org git at git.openembedded.org
Wed Aug 8 07:10:33 UTC 2012


Module: meta-openembedded.git
Branch: master
Commit: e32c470d32809be3d0249097214881021532fb2c
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=e32c470d32809be3d0249097214881021532fb2c

Author: Martin Jansa <martin.jansa at gmail.com>
Date:   Mon Aug  6 22:12:16 2012 +0000

systemd-compat-units: use systemctl mask

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>

---

 .../recipes-core/systemd/systemd-compat-units.bb   |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/meta-systemd/recipes-core/systemd/systemd-compat-units.bb b/meta-systemd/recipes-core/systemd/systemd-compat-units.bb
index 2973208..aefd6a7 100644
--- a/meta-systemd/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta-systemd/recipes-core/systemd/systemd-compat-units.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Units to make systemd work better with existing sysvinit scripts"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r16"
+PR = "r17"
 
 inherit allarch
 
@@ -38,11 +38,17 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
 pkg_postinst_${PN} () {
 cd $D${sysconfdir}/init.d
 
-echo -n "Disabling the following sysv scripts: "
+echo "Disabling the following sysv scripts: "
+
+OPTS=""
+
+if [ -n "$D" ]; then
+    OPTS="--root=$D"
+fi
 
 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
-    if [ \( -e $i -o $i.sh \) -a ! -e $D${base_libdir}/systemd/system/$i.service ] ; then
-        echo -n "$i " ; ln -s /dev/null $D${base_libdir}/systemd/system/$i.service
+    if [ \( -e $i -o $i.sh \) -a ! -e $D${sysconfdir}/systemd/system/$i.service ] ; then
+        echo -n "$i: " ; systemctl ${OPTS} mask $i.service
     fi
 done ; echo
 }





More information about the Openembedded-commits mailing list