sonic-buildimage/platform/innovium/sonic-platform-modules-cameo/esc602-32q/utils/halt

19 lines
346 B
Plaintext
Raw Normal View History

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