Specify facility used by mcklogd via option

1. You can specify facility through -f option of mcreboot.sh.
   Example:
   mcreboot.sh -k 1 -f LOG_LOCAL6
   Note that you need to specify "-k 1" or "-k 2" to start mcklogd.
2. Kill mcklogd if needed in mcreboot.sh and mcstop+release.sh.
This commit is contained in:
Masamichi Takagi
2016-08-17 17:46:44 +09:00
parent a2456c3ed2
commit 1ce1b17a85
2 changed files with 9 additions and 2 deletions

View File

@ -24,11 +24,14 @@ cpus=""
INTERVAL=1 INTERVAL=1
LOGMODE=0 LOGMODE=0
facility="LOG_LOCAL6"
chown_option=`logname` chown_option=`logname`
while getopts :i:k:c:m:o: OPT while getopts :i:k:c:m:o:f: OPT
do do
case ${OPT} in case ${OPT} in
f) facility=${OPTARG}
;;
o) chown_option=${OPTARG} o) chown_option=${OPTARG}
;; ;;
i) INTERVAL=${OPTARG} i) INTERVAL=${OPTARG}
@ -203,5 +206,7 @@ if [ "$enable_mcoverlay" == "yes" ]; then
fi fi
if [ ${LOGMODE} -ne 0 ] if [ ${LOGMODE} -ne 0 ]
then then
SBINDIR=${SBINDIR} ${SBINDIR}/mcklogd -i ${INTERVAL} # mcklogd survives when McKernel isn't shut down by mcstop+release.sh
pkill mcklogd
SBINDIR=${SBINDIR} ${SBINDIR}/mcklogd -i ${INTERVAL} -f ${facility}
fi fi

View File

@ -49,3 +49,5 @@ if [ "`lsmod | grep -E 'ihk\s' | awk '{print $1}'`" != "" ]; then
if ! rmmod ihk; then echo "error: removing ihk" >&2; exit 1; fi if ! rmmod ihk; then echo "error: removing ihk" >&2; exit 1; fi
fi fi
# Stop mcklogd
pkill mcklogd