summaryrefslogtreecommitdiff
path: root/meta-facebook
diff options
context:
space:
mode:
authorPotin Lai <potin.lai@quantatw.com>2023-02-09 14:05:37 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-02-09 21:05:43 +0300
commit9776fffa8a20f3df845676536449e4687cd984eb (patch)
treeaf7fc0935e19ff2177ce405ddab7abff63b14c82 /meta-facebook
parent1c0ad56ce6422742cc84bf9116b38f4e4548758f (diff)
downloadopenbmc-9776fffa8a20f3df845676536449e4687cd984eb.tar.xz
meta-bletchley: apply power restore policy when host ac-on
We need to apply power restore policy when host ac from off to on. Add post command in host-ac-on@.service to restart phosphor-discover-system-state@.service. Tested results: ``` root@bletchley:~# busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host6/power_restore_policy xyz.openbmc_project.Control.Power.RestorePolicy PowerRestorePolicy s xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn root@bletchley:~# busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host6/power_restore_policy xyz.openbmc_project.Control.Power.RestorePolicy PowerRestorePolicy s "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn" root@bletchley:~# obmcutil -i=6 chassisoff root@bletchley:~# obmcutil -i=6 state CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive root@bletchley:~# obmcutil -i=6 chassison root@bletchley:~# obmcutil -i=6 state CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive ``` Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I57dd159725dd75da651beec2c72410c187f9fc17
Diffstat (limited to 'meta-facebook')
-rw-r--r--meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service
index 32bdf491af..657b2a8ea9 100644
--- a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service
@@ -8,6 +8,7 @@ Conflicts=host-ac-off@%i.service
Type=oneshot
ExecStart=/usr/sbin/power-ctrl sled%i ac-on
SyslogIdentifier=power-ctrl
+ExecStartPost=/bin/systemctl restart phosphor-discover-system-state@%i.service
[Install]
WantedBy=multi-user.target