sonic-buildimage/platform/innovium/sonic-platform-modules-cameo/escc601-32q/utils/poweroff
shihjeff 940aaa0cbe
[201911] [Innovium] Update Cameo & Wistron Drivers (#7855)
Fix #8068

Update Innovium configs on Cameo and Wistron platforms
2021-07-21 09:09:36 -07:00

19 lines
342 B
Bash
Executable File

#!/bin/sh
mr_reboot() {
sudo rmmod x86-64-cameo-escc601-32q
sudo i2cset -y 0 0x30 0xa1 0
}
if [ $# -eq 0 ] || [ $@ = "-p" ] || [ $@ = "--reboot" ] || [ $@ = "--poweroff" ] || [ $@ = "-f" ] || [ $@ = "--force" ]; then
sync;sync
mr_reboot
elif [ $@ = "--halt" ]; then
sudo halt
else
echo "unsupported option"
fi