summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-06-10 10:49:23 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-06-10 15:46:21 +0200
commitea3ad6818eee8d43556bf69c337a5484eb0630e6 (patch)
treee732e03b27b20e9cbae46f15cbb80473f1eb41c9 /meta-oe
parentbc39328f21f06c23187d79132f6c8109ea28f15f (diff)
downloadmeta-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.bb11
-rw-r--r--meta-oe/recipes-core/systemd/systemd-compat-units/opkg.service8
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"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" 4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
5 5
6PR = "r1" 6PR = "r9"
7 7
8inherit allarch 8inherit allarch
9 9
@@ -11,8 +11,15 @@ SRC_URI = "file://opkg.service"
11 11
12do_install() { 12do_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
18pkg_postinst_${PN} () { 25pkg_postinst_${PN} () {
@@ -27,7 +34,7 @@ for i in busybox-udhcpc dnsmasq hwclock.sh networking syslog syslog.busybox ; do
27done ; echo 34done ; echo
28} 35}
29 36
30FILES_${PN} = "${base_libdir}/systemd/system" 37FILES_${PN} = "${base_libdir}/systemd/system ${bindir}"
31RDPEPENDS_${PN} = "systemd" 38RDPEPENDS_${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]
2Description=Opkg first boot configure 2Description=Opkg first boot configure
3DefaultDependencies=no
3ConditionPathExists=|/etc/rcS.d/S98configure 4ConditionPathExists=|/etc/rcS.d/S98configure
5Before=sysinit.target systemd-tmpfiles.service
4 6
5[Service] 7[Service]
6ExecStart=/etc/rcS.d/S98configure 8ExecStart=/etc/rcS.d/S98configure
7RemainAfterExit=no 9RemainAfterExit=No
10Type=oneshot
11StandardOutput=syslog
12TimeoutSec=0
8 13
9[Install] 14[Install]
10WantedBy=basic.target 15WantedBy=basic.target
16WantedBy=sysinit.target