summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/power
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/power')
-rw-r--r--meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-regulators.bb37
-rw-r--r--meta-phosphor/recipes-phosphor/power/phosphor-power.inc2
2 files changed, 38 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-regulators.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-regulators.bb
new file mode 100644
index 0000000000..6240fda48a
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-regulators.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Phosphor Power Regulator services installation"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+PR = "r1"
+
+inherit allarch
+
+RDEPENDS:${PN} += "phosphor-power-regulators"
+
+pkg_prerm:${PN}() {
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires/phosphor-regulators-config.service"
+ rm $LINK
+
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.wants/phosphor-regulators-monitor-enable.service"
+ rm $LINK
+
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@${i}.target.wants/phosphor-regulators-monitor-disable.service"
+ rm $LINK
+}
+pkg_postinst:${PN}() {
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires/phosphor-regulators-config.service"
+ TARGET="../phosphor-regulators-config.service"
+ ln -s $TARGET $LINK
+
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-regulators-monitor-enable.service"
+ TARGET="../phosphor-regulators-monitor-enable.service"
+ ln -s $TARGET $LINK
+
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-regulators-monitor-disable.service"
+ TARGET="../phosphor-regulators-monitor-disable.service"
+ ln -s $TARGET $LINK
+}
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc
index d60607754d..18287214b5 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-power"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/phosphor-power;branch=master;protocol=https"
-SRCREV = "aded7a0d4401ebd9f2d7d0fd089961aa33818224"
+SRCREV = "8c90f319d579357e671c7ebbf8b845f680bb1aa2"