meta-ibm: disable phosphor-ipmi-net by default p10bmc
This change will disable the IPMI network interface by default on the
first boot of a p10bmc system after a factory reset. After the first
boot the service is prevented from running again and from there on
adheres to the customers settings.
It is necessary that IPMI network services are started for a brief
moment in time to ensure they show up in the systemd service list.
This is important to ensure that the service-config-manager, which is
responsible for enabling/disabling these services can properly locate
them in the systemd service list.
Tested:
- Issued 5 mini-factory resets to mimic a fresh system boot
Verified service-config-manager identified both IPMI service and
socket files for eth0 and eth1
Verified IPMI was disabled by default
Verified could enable IPMI via the web UI and could issue IPMI
commands using ipmitool with a user that was in the IPMI group
Verified that once IPMI was enabled, it stayed enabled through BMC
reboots
Verified when IPMI was disabled via the GUI, it stayed disabled
through BMC reboots
Signed-off-by: Corey Hardesty <corey.hardesty@icloud.com>
Change-Id: Idad03366c1eb11cbfd7f4ad700976c177eb0121f
diff --git a/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
index 82705c4..7883432 100644
--- a/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
+++ b/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -9,3 +9,12 @@
${PN}@${ALT_RMCPP_IFACE}.service \
${PN}@${ALT_RMCPP_IFACE}.socket \
"
+
+FILESEXTRAPATHS:prepend:p10bmc := "${THISDIR}/${PN}:"
+SRC_URI:append:p10bmc = " file://first-boot-disable-ipmi-net.service"
+SYSTEMD_SERVICE:${PN}:append:p10bmc = " first-boot-disable-ipmi-net.service"
+
+do_install:append:p10bmc() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/first-boot-disable-ipmi-net.service ${D}${systemd_system_unitdir}/
+}