meta-ampere: power control: correct the script
The power functions are failed to work. There is one mistake in
merging ampere_power_utils.sh script. This commit fixes the mistake.
Tested:
1. Power off the host when it is on.
2. The host state should be changed to off.
Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com>
Change-Id: Iaa253e4b8d0f645a2b7097501e8c602d693cb37a
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh
index 4ad07a6..2c8ba3d91 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh
@@ -4,7 +4,7 @@
# Usage of this utility
function usage() {
- echo "usage: power-util mb [on|status|cycle|reset|graceful_reset|force_reset|soft_off]";
+ echo "usage: power-util mb [status|shutdown_ack|force_reset|soft_off]";
}
power_status() {
@@ -22,24 +22,8 @@
touch /run/openbmc/host@0-softpoweroff-shutdown-ack
else
echo "Receive shutdown ACK triggered"
-<<<<<<< HEAD
- fi
-}
-
-graceful_shutdown() {
- if [ -f "/run/openbmc/host@0-request" ]; then
- echo "shutdown host immediately"
- power_off
- else
- echo "Triggering graceful shutdown"
- gpioset -l 0 49=1
- sleep 1
- gpioset -l 0 49=0
- sleep 30s
-=======
sleep 3
systemctl start obmc-chassis-poweroff@0.target
->>>>>>> 397e033ef... meta-ampere: power control: refactor host power control
fi
}