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
LOGMODE=0
facility="LOG_LOCAL6"
chown_option=`logname`
while getopts :i:k:c:m:o: OPT
while getopts :i:k:c:m:o:f: OPT
do
case ${OPT} in
f) facility=${OPTARG}
;;
o) chown_option=${OPTARG}
;;
i) INTERVAL=${OPTARG}
@ -203,5 +206,7 @@ if [ "$enable_mcoverlay" == "yes" ]; then
fi
if [ ${LOGMODE} -ne 0 ]
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