diff options
| author | Koen Kooi <koen@dominion.thruhere.net> | 2011-06-10 10:49:23 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-06-10 15:46:21 +0200 |
| commit | ea3ad6818eee8d43556bf69c337a5484eb0630e6 (patch) | |
| tree | e732e03b27b20e9cbae46f15cbb80473f1eb41c9 /meta-oe | |
| parent | bc39328f21f06c23187d79132f6c8109ea28f15f (diff) | |
| download | meta-openembedded-ea3ad6818eee8d43556bf69c337a5484eb0630e6.tar.gz | |
systemd-compat-units: make opkg unit block startup
Without Type=oneshot it would configure things in the background and bootup would go as normal. Now it will block sysinit.target till it's done.
Sadly no full feedback on the console yet.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-core/systemd/systemd-compat-units.bb | 11 | ||||
| -rw-r--r-- | meta-oe/recipes-core/systemd/systemd-compat-units/opkg.service | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units.bb b/meta-oe/recipes-core/systemd/systemd-compat-units.bb index 2fd88abcd9..7571514068 100644 --- a/meta-oe/recipes-core/systemd/systemd-compat-units.bb +++ b/meta-oe/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 = "r1" | 6 | PR = "r9" |
| 7 | 7 | ||
| 8 | inherit allarch | 8 | inherit allarch |
| 9 | 9 | ||
| @@ -11,8 +11,15 @@ SRC_URI = "file://opkg.service" | |||
| 11 | 11 | ||
| 12 | do_install() { | 12 | do_install() { |
| 13 | install -d ${D}${base_libdir}/systemd/system/basic.target.wants | 13 | install -d ${D}${base_libdir}/systemd/system/basic.target.wants |
| 14 | install -d ${D}${base_libdir}/systemd/system/sysinit.target.wants/ | ||
| 14 | install -m 0644 ${WORKDIR}/opkg.service ${D}${base_libdir}/systemd/system | 15 | install -m 0644 ${WORKDIR}/opkg.service ${D}${base_libdir}/systemd/system |
| 15 | ln -sf ../opkg.service ${D}${base_libdir}/systemd/system/basic.target.wants/ | 16 | ln -sf ../opkg.service ${D}${base_libdir}/systemd/system/basic.target.wants/ |
| 17 | ln -sf ../opkg.service ${D}${base_libdir}/systemd/system/sysinit.target.wants/ | ||
| 18 | |||
| 19 | # hack to make old style sysvinit postinsts succeed | ||
| 20 | install -d ${D}${bindir} | ||
| 21 | echo "echo 1" > ${D}${bindir}/runlevel | ||
| 22 | chmod 0755 ${D}${bindir}/runlevel | ||
| 16 | } | 23 | } |
| 17 | 24 | ||
| 18 | pkg_postinst_${PN} () { | 25 | pkg_postinst_${PN} () { |
| @@ -27,7 +34,7 @@ for i in busybox-udhcpc dnsmasq hwclock.sh networking syslog syslog.busybox ; do | |||
| 27 | done ; echo | 34 | done ; echo |
| 28 | } | 35 | } |
| 29 | 36 | ||
| 30 | FILES_${PN} = "${base_libdir}/systemd/system" | 37 | FILES_${PN} = "${base_libdir}/systemd/system ${bindir}" |
| 31 | RDPEPENDS_${PN} = "systemd" | 38 | RDPEPENDS_${PN} = "systemd" |
| 32 | 39 | ||
| 33 | 40 | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units/opkg.service b/meta-oe/recipes-core/systemd/systemd-compat-units/opkg.service index c346e57c35..43da75cfe6 100644 --- a/meta-oe/recipes-core/systemd/systemd-compat-units/opkg.service +++ b/meta-oe/recipes-core/systemd/systemd-compat-units/opkg.service | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | [Unit] | 1 | [Unit] |
| 2 | Description=Opkg first boot configure | 2 | Description=Opkg first boot configure |
| 3 | DefaultDependencies=no | ||
| 3 | ConditionPathExists=|/etc/rcS.d/S98configure | 4 | ConditionPathExists=|/etc/rcS.d/S98configure |
| 5 | Before=sysinit.target systemd-tmpfiles.service | ||
| 4 | 6 | ||
| 5 | [Service] | 7 | [Service] |
| 6 | ExecStart=/etc/rcS.d/S98configure | 8 | ExecStart=/etc/rcS.d/S98configure |
| 7 | RemainAfterExit=no | 9 | RemainAfterExit=No |
| 10 | Type=oneshot | ||
| 11 | StandardOutput=syslog | ||
| 12 | TimeoutSec=0 | ||
| 8 | 13 | ||
| 9 | [Install] | 14 | [Install] |
| 10 | WantedBy=basic.target | 15 | WantedBy=basic.target |
| 16 | WantedBy=sysinit.target | ||
