diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-01 13:42:28 +0100 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-01 14:33:10 +0100 |
commit | 239e817197b287e1a3dc981737543fb9460999e6 (patch) | |
tree | 831806baf92382820b935e397bff302209f9df74 /meta-oe | |
parent | fa226d8c6c7808b5ac6b4aab3349872e090c7e09 (diff) | |
download | meta-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')
-rw-r--r-- | meta-oe/recipes-core/systemd/systemd-compat-units.bb | 8 | ||||
-rw-r--r-- | meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service | 16 |
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" | |||
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 = "r12" | 6 | PR = "r14" |
7 | 7 | ||
8 | inherit allarch | 8 | inherit allarch |
9 | 9 | ||
10 | SRC_URI = "file://opkg.service" | 10 | SRC_URI = "file://*.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 |
@@ -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] | ||
2 | Description=Machine ID first boot configure | ||
3 | DefaultDependencies=no | ||
4 | ConditionPathExists=|!/etc/machine-id | ||
5 | After=remount-rootfs.service | ||
6 | Before=sysinit.target | ||
7 | |||
8 | [Service] | ||
9 | ExecStart=/bin/systemd-machine-id-setup | ||
10 | RemainAfterExit=No | ||
11 | Type=oneshot | ||
12 | StandardOutput=syslog | ||
13 | |||
14 | [Install] | ||
15 | WantedBy=basic.target | ||
16 | WantedBy=sysinit.target | ||