syslogd: Add FreeBSD -k option to allow LOG_KERNEL facility messages

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2019-11-13 16:44:51 +01:00
parent c465f340bc
commit 9d415f313f
4 changed files with 22 additions and 8 deletions

View File

@ -194,8 +194,8 @@ static int addpeer(struct peer *pe0)
int usage(int code)
{
printf("Usage:\n"
" syslogd [-46Adnrsv?] [-a PEER] [-b :PORT] [-b ADDR[:PORT]] [-f FILE] [-m SEC]\n"
" [-P PID_FILE] [-p SOCK_PATH] [-R SIZE[:NUM]]\n"
" syslogd [-46Adknrsv?] [-a PEER] [-b :PORT] [-b ADDR[:PORT]] [-f FILE] [-m SEC]\n"
" [-P PID_FILE] [-p SOCK_PATH] [-R SIZE[:NUM]]\n"
"Options:\n"
" -4 Force IPv4 only\n"
" -6 Force IPv6 only\n"
@ -222,6 +222,7 @@ int usage(int code)
"\n"
" -d Enable debug mode\n"
" -f FILE Alternate .conf file, default: /etc/syslog.conf\n"
" -k Allow logging with facility 'kernel', otherwise remapped to 'user'.\n"
" -m SEC Interval between MARK messages in log, 0 to disable, default: 20 min\n"
" -n Run in foreground, required when run from a modern init/supervisor\n"
" -P FILE File to store the process ID, default: %s\n"
@ -304,6 +305,10 @@ int main(int argc, char *argv[])
RemoteHostname = 1;
break;
case 'k': /* keep remote kern fac */
KeepKernFac = 1;
break;
case 'm': /* mark interval */
MarkInterval = atoi(optarg) * 60;
break;