Commit 239e8171 authored by Koen Kooi's avatar Koen Kooi
Browse files

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

parent fa226d8c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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
+16 −0
Original line number Diff line number Diff line
[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