diff options
Diffstat (limited to 'meta-systemd')
-rw-r--r-- | meta-systemd/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 2973208b1..aefd6a758 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" | |||
3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" |
5 | 5 | ||
6 | PR = "r16" | 6 | PR = "r17" |
7 | 7 | ||
8 | inherit allarch | 8 | inherit allarch |
9 | 9 | ||
@@ -38,11 +38,17 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \ | |||
38 | pkg_postinst_${PN} () { | 38 | pkg_postinst_${PN} () { |
39 | cd $D${sysconfdir}/init.d | 39 | cd $D${sysconfdir}/init.d |
40 | 40 | ||
41 | echo -n "Disabling the following sysv scripts: " | 41 | echo "Disabling the following sysv scripts: " |
42 | |||
43 | OPTS="" | ||
44 | |||
45 | if [ -n "$D" ]; then | ||
46 | OPTS="--root=$D" | ||
47 | fi | ||
42 | 48 | ||
43 | for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do | 49 | for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do |
44 | if [ \( -e $i -o $i.sh \) -a ! -e $D${base_libdir}/systemd/system/$i.service ] ; then | 50 | if [ \( -e $i -o $i.sh \) -a ! -e $D${sysconfdir}/systemd/system/$i.service ] ; then |
45 | echo -n "$i " ; ln -s /dev/null $D${base_libdir}/systemd/system/$i.service | 51 | echo -n "$i: " ; systemctl ${OPTS} mask $i.service |
46 | fi | 52 | fi |
47 | done ; echo | 53 | done ; echo |
48 | } | 54 | } |