[PATCH openbmc] systemd: Add OpenBMC standby target

OpenBMC Patches openbmc-patches at stwcx.xyz
Mon Jul 11 14:40:31 AEST 2016


From: Brad Bishop <bradleyb at fuzziesquirrel.com>

Add a target pulled in by multi-user to which Phosphor applications
can be added.  This is an organizational change only.

Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
---
 .../common/recipes-core/systemd/systemd/obmc-standby.target          | 2 ++
 meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend         | 5 +++++
 2 files changed, 7 insertions(+)
 create mode 100644 meta-phosphor/common/recipes-core/systemd/systemd/obmc-standby.target

diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/obmc-standby.target b/meta-phosphor/common/recipes-core/systemd/systemd/obmc-standby.target
new file mode 100644
index 0000000..d8cd72f
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/systemd/systemd/obmc-standby.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=OpenBMC System
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
index 9ad6a40..e2995dc 100644
--- a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
@@ -2,11 +2,16 @@ PACKAGECONFIG_append = " networkd"
 PACKAGECONFIG_remove = "machined hibernate ldconfig binfmt backlight quotacheck localed kdbus ima smack polkit"
 FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
 SRC_URI += "file://default.network"
+SRC_URI += "file://obmc-standby.target"
 
 FILES_${PN} += "${libdir}/systemd/network/default.network"
+FILES_${PN} += "${systemd_system_unitdir}/obmc-standby.target"
 
 do_install_append() {
         install -m 644 ${WORKDIR}/default.network ${D}${libdir}/systemd/network/
+        install -m 644 ${WORKDIR}/obmc-standby.target ${D}${systemd_system_unitdir}
+        ln -sf ../obmc-standby.target \
+                ${D}${systemd_system_unitdir}/multi-user.target.wants/obmc-standby.target
 
         #TODO Remove after this issue is resolved
         #https://github.com/openbmc/openbmc/issues/152
-- 
2.9.0




More information about the openbmc mailing list