[oe-commits] Koen Kooi : systemd-compat-units: run systemd-machine-id-setup

git at git.openembedded.org git at git.openembedded.org
Tue Nov 1 19:13:28 UTC 2011


Module: meta-openembedded.git
Branch: master
Commit: 239e817197b287e1a3dc981737543fb9460999e6
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=239e817197b287e1a3dc981737543fb9460999e6

Author: Koen Kooi <koen at dominion.thruhere.net>
Date:   Tue Nov  1 13:42:28 2011 +0100

systemd-compat-units: run systemd-machine-id-setup

Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>

---

 .../recipes-core/systemd/systemd-compat-units.bb   |    8 ++++++--
 .../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 ffcfab2..9b60bbc 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"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r12"
+PR = "r14"
 
 inherit allarch
 
-SRC_URI = "file://opkg.service"
+SRC_URI = "file://*.service"
 
 do_install() {
 	install -d ${D}${base_libdir}/systemd/system/basic.target.wants
@@ -16,6 +16,10 @@ do_install() {
 	ln -sf ../opkg.service ${D}${base_libdir}/systemd/system/basic.target.wants/
 	ln -sf ../opkg.service ${D}${base_libdir}/systemd/system/sysinit.target.wants/
 
+	install -m 0644 ${WORKDIR}/machineid.service ${D}${base_libdir}/systemd/system
+	ln -sf ../machineid.service ${D}${base_libdir}/systemd/system/sysinit.target.wants/
+	ln -sf ../machineid.service ${D}${base_libdir}/systemd/system/basic.target.wants/
+
 	# hack to make old style sysvinit postinsts succeed
 	install -d ${D}${bindir}
 	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 0000000..cab8f76
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Machine ID first boot configure
+DefaultDependencies=no
+ConditionPathExists=|!/etc/machine-id
+After=remount-rootfs.service
+Before=sysinit.target
+
+[Service]
+ExecStart=/bin/systemd-machine-id-setup
+RemainAfterExit=No
+Type=oneshot
+StandardOutput=syslog
+
+[Install]
+WantedBy=basic.target
+WantedBy=sysinit.target





More information about the Openembedded-commits mailing list