diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-08-06 14:45:37 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-08-07 12:21:23 +0200 |
| commit | fc4cadbbb5227e0201964b48ecf69cc30fb6e874 (patch) | |
| tree | f282441babc81fae91da2dbe65d8017cf2c9f4c3 | |
| parent | bf986b802f5044002b0e974e96cdd8fd1cab007e (diff) | |
| download | meta-openembedded-fc4cadbbb5227e0201964b48ecf69cc30fb6e874.tar.gz | |
systemd-compat-units: move list of disabled services to variable, fix hwclock.sh and output
* variable allows to add items in .bbappend without overwritting whole
postinst
* hwclock.service should be used to blacklist SYSV hwclock.sh (not hwclock.sh.service)
* show only newly disabled SYSV scripts
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-systemd/recipes-core/systemd/systemd-compat-units.bb | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/meta-systemd/recipes-core/systemd/systemd-compat-units.bb b/meta-systemd/recipes-core/systemd/systemd-compat-units.bb index c9a6b679e1..2973208b14 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 = "r15" | 6 | PR = "r16" |
| 7 | 7 | ||
| 8 | inherit allarch | 8 | inherit allarch |
| 9 | 9 | ||
| @@ -26,15 +26,24 @@ do_install() { | |||
| 26 | chmod 0755 ${D}${bindir}/runlevel | 26 | chmod 0755 ${D}${bindir}/runlevel |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | SYSTEMD_DISABLED_SYSV_SERVICES = " \ | ||
| 30 | busybox-udhcpc \ | ||
| 31 | dnsmasq \ | ||
| 32 | hwclock \ | ||
| 33 | networking \ | ||
| 34 | syslog \ | ||
| 35 | syslog.busybox \ | ||
| 36 | " | ||
| 37 | |||
| 29 | pkg_postinst_${PN} () { | 38 | pkg_postinst_${PN} () { |
| 30 | cd $D${sysconfdir}/init.d | 39 | cd $D${sysconfdir}/init.d |
| 31 | 40 | ||
| 32 | echo -n "Disabling the following sysv scripts: " | 41 | echo -n "Disabling the following sysv scripts: " |
| 33 | 42 | ||
| 34 | for i in busybox-udhcpc dnsmasq hwclock.sh networking syslog syslog.busybox ; do | 43 | for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do |
| 35 | if [ -e $i ] ; then | 44 | if [ \( -e $i -o $i.sh \) -a ! -e $D${base_libdir}/systemd/system/$i.service ] ; then |
| 36 | echo -n "$i " ; ln -s /dev/null $D${systemd_unitdir}/system/$i.service | 45 | echo -n "$i " ; ln -s /dev/null $D${base_libdir}/systemd/system/$i.service |
| 37 | fi | 46 | fi |
| 38 | done ; echo | 47 | done ; echo |
| 39 | } | 48 | } |
| 40 | 49 | ||
