summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-11-01 13:42:28 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-11-01 14:33:10 +0100
commit239e817197b287e1a3dc981737543fb9460999e6 (patch)
tree831806baf92382820b935e397bff302209f9df74 /meta-oe/recipes-core
parentfa226d8c6c7808b5ac6b4aab3349872e090c7e09 (diff)
downloadmeta-openembedded-239e817197b287e1a3dc981737543fb9460999e6.tar.gz
systemd-compat-units: run systemd-machine-id-setup
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-core')
-rw-r--r--meta-oe/recipes-core/systemd/systemd-compat-units.bb8
-rw-r--r--meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service16
2 files changed, 22 insertions, 2 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units.bb b/meta-oe/recipes-core/systemd/systemd-compat-units.bb
index ffcfab22d..9b60bbc8d 100644
--- a/meta-oe/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta-oe/recipes-core/systemd/systemd-compat-units.bb
@@ -3,11 +3,11 @@ 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 = "r12" 6PR = "r14"
7 7
8inherit allarch 8inherit allarch
9 9
10SRC_URI = "file://opkg.service" 10SRC_URI = "file://*.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
@@ -16,6 +16,10 @@ do_install() {
16 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/ 17 ln -sf ../opkg.service ${D}${base_libdir}/systemd/system/sysinit.target.wants/
18 18
19 install -m 0644 ${WORKDIR}/machineid.service ${D}${base_libdir}/systemd/system
20 ln -sf ../machineid.service ${D}${base_libdir}/systemd/system/sysinit.target.wants/
21 ln -sf ../machineid.service ${D}${base_libdir}/systemd/system/basic.target.wants/
22
19 # hack to make old style sysvinit postinsts succeed 23 # hack to make old style sysvinit postinsts succeed
20 install -d ${D}${bindir} 24 install -d ${D}${bindir}
21 echo "echo 1" > ${D}${bindir}/runlevel 25 echo "echo 1" > ${D}${bindir}/runlevel
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service b/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service
new file mode 100644
index 000000000..cab8f76ab
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service
@@ -0,0 +1,16 @@
1[Unit]
2Description=Machine ID first boot configure
3DefaultDependencies=no
4ConditionPathExists=|!/etc/machine-id
5After=remount-rootfs.service
6Before=sysinit.target
7
8[Service]
9ExecStart=/bin/systemd-machine-id-setup
10RemainAfterExit=No
11Type=oneshot
12StandardOutput=syslog
13
14[Install]
15WantedBy=basic.target
16WantedBy=sysinit.target