summaryrefslogtreecommitdiff
path: root/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh
diff options
context:
space:
mode:
authorCharles Boyer <Charles.Boyer@fii-usa.com>2021-08-28 00:09:03 +0300
committerVivekanand Veeracholan <vveerach@google.com>2021-11-11 01:46:50 +0300
commit17b216ac6c9762ea781786787c1ccc9199e291c3 (patch)
tree0a544aca4ce153ea713e3293f83375dbd7f092a9 /meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh
parent200e8ca29afb46d10989210532bb2dccc76b4959 (diff)
downloadopenbmc-17b216ac6c9762ea781786787c1ccc9199e291c3.tar.xz
meta-fii/meta-kudo: Customize chassis power cycle action
Instead of a host or chassis restart for a Chassis PowerCycle, have both the BMC and host perform a hard reset. This requires changes to phosphor-state-manager to add the handling of xyz.openbmc_project.State.Chassis.Transition.PowerCycle. Currently, there is handling for On and Off, but not PowerCycle. Signed-off-by: Charles Boyer <Charles.Boyer@fii-usa.com> Change-Id: I3d934c47a68899b2fd8fcba966f8d92c97554a77
Diffstat (limited to 'meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh')
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh b/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh
index 8d58a0827..905c7f23a 100644
--- a/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh
+++ b/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh
@@ -4,7 +4,11 @@ source /usr/sbin/kudo-lib.sh
# Usage of this utility
function usage() {
- echo "usage: power-util mb [on|off|graceful_shutdown|force_reset|shutdown_ack]";
+ echo "usage: power-util mb [on|off|graceful_shutdown|force_reset|shutdown_ack|hotswap]";
+}
+
+hotswap() {
+ kudo.sh rst hotswap
}
force_off() {
@@ -113,6 +117,8 @@ elif [ $2 = "off" ]; then
force_off
fi
fi
+elif [[ $2 == "hotswap" ]]; then
+ hotswap
elif [[ $2 == "graceful_shutdown" ]]; then
graceful_shutdown
elif [ $2 == "force_reset" ]; then