TO RESET: mcreboot, mcstop+release.sh: add functions

Change-Id: Ic3992dc4e16b7ade00e93edbd107c64a32068c02
This commit is contained in:
Balazs Gerofi
2020-01-10 15:51:01 +09:00
committed by Masamichi Takagi
parent 10b17e230c
commit bbfb296c26
3 changed files with 123 additions and 2 deletions

View File

@@ -18,9 +18,10 @@ KERNDIR="@KERNDIR@"
mem=""
cpus=""
kill_in_use=""
dont_unload="no"
RMMOD_PATH=/sbin/rmmod
while getopts r:k OPT
while getopts r:kR OPT
do
case ${OPT} in
r)
@@ -29,6 +30,9 @@ do
k)
kill_in_use=1
;;
R)
dont_unload="yes"
;;
\?) exit 1
;;
esac
@@ -115,6 +119,10 @@ if ! sudo ${SBINDIR}/ihkconfig 0 release mem "all" > /dev/null; then
exit 1
fi
if [ "${dont_unload}" == "yes" ]; then
exit 0
fi
# Remove delegator if loaded
if grep mcctrl /proc/modules &>/dev/null; then
if ! sudo ${RMMOD_PATH} mcctrl 2>/dev/null; then