syslogd: Audit usage text, slim down, fix -R to -r conversion

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-12-10 08:34:49 +01:00
parent 84f8e51541
commit 2bbafcbd16

View File

@ -192,52 +192,51 @@ int usage(int code)
{ {
printf("Usage:\n" printf("Usage:\n"
" syslogd [-46AdFknsTv?] [-a PEER] [-b NAME] [-f FILE] [-m INTERVAL]\n" " syslogd [-46AdFknsTv?] [-a PEER] [-b NAME] [-f FILE] [-m INTERVAL]\n"
" [-P PID_FILE] [-p SOCK_PATH] [-R SIZE[:NUM]]\n" " [-P PID_FILE] [-p SOCK_PATH] [-r SIZE[:NUM]]\n"
"Options:\n" "Options:\n"
" -4 Force IPv4 only\n" " -4 Force IPv4 only\n"
" -6 Force IPv6 only\n" " -6 Force IPv6 only\n"
" -A Send to all addresses in DNS A, or AAAA record\n" " -A Send to all addresses in DNS A, or AAAA record\n"
" -a PEER Allow PEER to log to this syslogd using UDP datagrams. Multiple -a\n" " -a PEER Allow PEER to use us as a remote syslog sink. Ignored when started\n"
" options may be specified. PEER is one of:\n" " with -s. Multiple -a options may be specified:\n"
" ipaddr[/len][:port] Accept messages from 'ipaddr', which may\n" " ipaddr[/len][:port] Accept messages from 'ipaddr', which may\n"
" be IPv4, or IPv6 if enclosed with '[' and\n" " be IPv4 or IPv6 if enclosed with '[' and\n"
" ']'. The optional port may be a service\n" " ']'. The optional port may be a service\n"
" name or a port number.\n" " name or a port number\n"
" domainname[:port] Accept messages where the reverse address\n" " domainname[:port] Accept messages where the reverse address\n"
" lookup yields 'domainname' for the sender\n" " lookup yields 'domainname' for the sender\n"
" adress. 'domainname' can contain special\n" " adress. 'domainname' may contain special\n"
" shell-style pattern characters such as '*'\n" " shell-style pattern characters like '*'\n"
"\n" "\n"
" -b NAME Bind to a specific address and/or port. Multiple -b options may be\n" " -b NAME Bind to a specific address and/or port. Multiple -b options may be\n"
" specified. By default syslogd listens on all interfaces on UDP port\n" " specified. Default is to listen on all interfaces on UDP port 514,\n"
" 514, unless also started with -s, see below. NAME is one of:\n" " unless also started with -s:\n"
" address[:port] The address can be either a hostname or an\n" " address[:port] Hostname or IP address, IPv6 addresses\n"
" IP address. If an IPv6 address is specified,\n" " must be enclosed in '[' and ']'\n"
" it should be enclosed in '[' and ']'.\n" " :port UDP port number, or service name\n"
" :port The port is either a UDP port number, or a\n" " default: 'syslog', port 514\n"
" service name, default is 'syslog', port 514.\n"
"\n" "\n"
" -d Enable debug mode, implicitly enables -F to prevent backgrounding\n" " -d Enable debug mode, implicitly enables -F to prevent backgrounding\n"
" -F Run in foreground, required when run from a modern init/supervisor\n" " -F Run in foreground, required when monitored by init(1)\n"
" -f FILE Alternate .conf file, default: /etc/syslog.conf\n" " -f FILE Alternate .conf file, default: %s\n"
" -k Allow logging with facility 'kernel', otherwise remapped to 'user'.\n" " -k Allow logging with facility 'kernel', otherwise remapped to 'user'\n"
" -m MINS Interval between MARK messages in log, 0 to disable, default: 20 min\n" " -m MINS Interval between MARK messages, 0 to disable, default: 20 min\n"
" -n Disable DNS query for every request\n" " -n Disable DNS query for every request\n"
" -P FILE File to store the process ID, default: %s\n" " -P FILE File to store the process ID, default: %s\n"
" -p PATH Path to UNIX domain socket, multiple -p create multiple sockets. If\n" " -p PATH Path to UNIX domain socket, multiple -p create multiple sockets.\n"
" no -p argument is given the default %s is used\n" " Default, if no -p argument is given: %s\n"
" -r S[:R] Enable log rotation. The size argument (S) takes k/M/G qualifiers,\n" " -r S[:R] Enable log rotation. The size argument (S) takes k/M/G qualifiers,\n"
" e.g. 2M for 2 MiB. The optional rotations argument default to 5.\n" " e.g. 2M for 2 MiB. The optional rotations argument default to 5.\n"
" Rotation can also be defined per log file in syslog.conf\n" " Rotation can also be defined per log file in %s\n"
" -s Operate in secure mode, do not log messages from remote machines.\n" " -s Operate in secure mode, do not log messages from remote machines.\n"
" If specified twice, no socket at all will be opened, which also\n" " If specified twice, no socket at all will be opened, which also\n"
" disables support for logging to remote machines.\n" " disables support for logging to remote machines.\n"
" -T Use local time and date for all messages recived from remote hosts.\n" " -T Use local time and date for messages recived from remote hosts\n"
" -? Show this help text\n" " -? Show this help text\n"
" -v Show program version and exit\n" " -v Show program version and exit\n"
"\n" "\n"
"Bug report address: %s\n", "Bug report address: %s\n",
_PATH_LOGPID, _PATH_LOG, PACKAGE_BUGREPORT); _PATH_LOGCONF, _PATH_LOGPID, _PATH_LOG, _PATH_LOGCONF, PACKAGE_BUGREPORT);
#ifdef PACKAGE_URL #ifdef PACKAGE_URL
printf("Project home page: %s\n", PACKAGE_URL); printf("Project home page: %s\n", PACKAGE_URL);
#endif #endif