diff options
author | rillig <rillig@pkgsrc.org> | 2007-11-03 14:28:21 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-11-03 14:28:21 +0000 |
commit | 9cd71b216dae441f70ac4b2d1f4e838113789069 (patch) | |
tree | 3426cef19b7248def429fd75449c265679a7c11b /sysutils/oak | |
parent | 68441028c7ecdd9463210ea0844c062031aa6ee8 (diff) | |
download | pkgsrc-9cd71b216dae441f70ac4b2d1f4e838113789069.tar.gz |
Imported oak from pkgsrc-wip.
Oak is a program that can be used to monitor syslogs from a collection
of servers and notify operators when problem conditions arise. In
addition to providing immediate notification of critical problems, oak
will also batch less critical problems into summary messages that can be
sent less often and via any medium.
Packaged by jdwhite@jdwhite.org.
Diffstat (limited to 'sysutils/oak')
-rw-r--r-- | sysutils/oak/DESCR | 5 | ||||
-rw-r--r-- | sysutils/oak/Makefile | 25 | ||||
-rw-r--r-- | sysutils/oak/PLIST | 6 | ||||
-rw-r--r-- | sysutils/oak/distinfo | 8 | ||||
-rw-r--r-- | sysutils/oak/files/oak.1 | 256 | ||||
-rw-r--r-- | sysutils/oak/files/oak.conf | 291 | ||||
-rw-r--r-- | sysutils/oak/files/oak.sh | 17 | ||||
-rw-r--r-- | sysutils/oak/patches/patch-aa | 19 | ||||
-rw-r--r-- | sysutils/oak/patches/patch-ab | 22 | ||||
-rw-r--r-- | sysutils/oak/patches/patch-ac | 22 |
10 files changed, 671 insertions, 0 deletions
diff --git a/sysutils/oak/DESCR b/sysutils/oak/DESCR new file mode 100644 index 00000000000..e4e8762ff8f --- /dev/null +++ b/sysutils/oak/DESCR @@ -0,0 +1,5 @@ +Oak is a program that can be used to monitor syslogs from a collection +of servers and notify operators when problem conditions arise. In +addition to providing immediate notification of critical problems, oak +will also batch less critical problems into summary messages that can be +sent less often and via any medium. diff --git a/sysutils/oak/Makefile b/sysutils/oak/Makefile new file mode 100644 index 00000000000..eec5a61ea79 --- /dev/null +++ b/sysutils/oak/Makefile @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $ +# + +DISTNAME= oak-1.5.0 +CATEGORIES= sysutils +MASTER_SITES= http://www.ktools.org/dist/oak/ + +MAINTAINER= jdwhite@jdwhite.org +HOMEPAGE= http://www.ktools.org/dist/oak/ +COMMENT= System log reporting tool + +USE_PKGLOCALEDIR= yes +USE_TOOLS+= gmake +GNU_CONFIGURE= yes +BUILD_TARGET= + +RCD_SCRIPTS= oak +CONF_FILES= ${PREFIX}/share/examples/oak/oak.conf ${PKG_SYSCONFDIR}/oak.conf + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/oak + ${INSTALL_DATA} ${FILESDIR}/oak.conf* ${PREFIX}/share/examples/oak/ + ${INSTALL_DATA} ${FILESDIR}/oak.1 ${PREFIX}/${PKGMANDIR}/man1/ + +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/oak/PLIST b/sysutils/oak/PLIST new file mode 100644 index 00000000000..7528e2f15df --- /dev/null +++ b/sysutils/oak/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $ +bin/oak +man/man1/oak.1 +share/examples/rc.d/oak +share/examples/oak/oak.conf +@dirrm share/examples/oak diff --git a/sysutils/oak/distinfo b/sysutils/oak/distinfo new file mode 100644 index 00000000000..764714994ce --- /dev/null +++ b/sysutils/oak/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $ + +SHA1 (oak-1.5.0.tar.gz) = cbfb413d0d6fcd16a7684b586c19ca481e060077 +RMD160 (oak-1.5.0.tar.gz) = b1ec46d5f5c0453b07b501d368196e7d884b150e +Size (oak-1.5.0.tar.gz) = 31034 bytes +SHA1 (patch-aa) = 4dba7d09f70786340881437dca77a99f0a731647 +SHA1 (patch-ab) = b202613feea1d6d9b538bbc1d34db6c64884c34c +SHA1 (patch-ac) = ce53cf83a7a1e3cb55bb12141a8f5fe744b1cacd diff --git a/sysutils/oak/files/oak.1 b/sysutils/oak/files/oak.1 new file mode 100644 index 00000000000..7117afb2808 --- /dev/null +++ b/sysutils/oak/files/oak.1 @@ -0,0 +1,256 @@ +.Dt OAK 1 +.Dd Feb 27, 2005 +.Dt OAK 1 +.Sh NAME +.Nm oak +.Nd System Log Reporting Tool +.Sh SYNOPSIS +.Nm +.Op Fl v +.Op Fl h +.Op Fl d +.Op Fl c Ar configfile +.Sh DESCRIPTION +Oak is a program that can be used to monitor syslogs from a collection +of servers and notify operators when problem conditions arise. In +addition to providing immediate notification of critical problems, oak +will also batch less critical problems into summary messages that can be +sent less often and via any medium. For example you may wish to have oak +page you on critical events while sending a summary of less important +messages to your terminal once an hour. In addition you could send a +daily email message summarizing all events. +.Pp +Oak runs as a daemon and monitors a syslog file for events. A common way +to run oak would be on a server that is receiving syslogs forwarded from +other servers. Based on a series of configurable regular expressions, +each message is placed into one or more user-defined queues. Each queue +is configured by the user to send out its messages after waiting some +period of time. +.Pp +Oak keeps its messages succinct in a number of ways. Oak is aware of +some information in log messages that will be unnecessary and produce +needlessly repeated messages. For example process id's and sendmail +queue id's can be automatically filtered out, thereby condensing +hundreds of message to one short notification. In the case that oak does +not know about a kind of log that can be condensed the configuration +file can specify the custom information to be removed. Finally, for each +medium being used to send messages the user can specify limits on the +length of the message, the line length, the number of hosts being +reported on, the number of messages per host, etc. This helps ensure that +a runaway message won't overwhelm its recipient. +.Pp +Available options: +.Bl -tag -width file +.It Fl v +print version number and exit +.It Fl h +print help message and exit +.It Fl d +run in debugging mode +.It Fl c Ar configfile +specify the oak config file. +.El +.Pp +.Sh CONFIGURATION FILE +The configuration file first defines a number of queues. Each queue will +take a certain action at a certain time interval. For example you might +define a queue called "daily-mail" that fires once a day and sends a +piece of email. Or you might define a queue called "immediate-page" +which would page you as soon as a problem was noticed. +.Pp +Next the configuration file specifies lists of regular expressions and +each regular expression is associated with one or more of the queues +defined earlier. Messages that come in are compared against the regular +expressions in order. When the first regular expression is found that +matches the message that message is placed in the queues associated with +that expression. +.Pp +Note that a trash queue is defined for you by default and any messages +queued to it are discarded. Because oak uses the first regular +expression it finds the trash queue may be helpful in discarding +unwanted messages while still allowing others to fall through by +default. +.Pp +Config syntax: +.Pp +.Bl -ohang +.It Sy set infile Ao Ar file Ac +.Bl -ohang -offset indent +Set the file being monitored to +.Ao Ar file Ac . +If this option is not specified in the config then it will default to +.Pa /var/adm/messages . +.El +.It Sy set Oo Sy no Oc Sy nukepid +.Bl -ohang -offset indent +[Don't] Automatically remove process id's from logs. This option is on +by default and is strongly recommended. +.El +.It Sy set Oo Sy no Oc Sy nukeciscoid +.Bl -ohang -offset indent +[Don't] Automatically remove log id numbers from cisco syslogs. This +option is on by default and is recommended if you are processing logs +from cisco equipment. +.El +.It Sy set Oo Sy no Oc Sy nukesmqid +.Bl -ohang -offset indent +[Don't] Automatically remove sendmail queue id numbers from logs. +This option is on by default and is recommended if you are processing +logs from sendmail. +.El +.It Sy set ignorehosts Ao Ar host Ac Oo Ao Ar host Ac ... Oc +.Bl -ohang -offset indent +Ignore logs from the hosts in the list. Make sure each host is +listed exactly as it will appear in the log (i.e. exactly as it will be +resolved by the local syslogd). This command can not be used at the same +time as the +.Em set onlyhosts +command. +.El +.It Sy set onlyhosts Ao Ar host Ac Oo Ao Ar host Ac ... Oc +.Bl -ohang -offset indent +Process logs only from the hosts in the list. Make sure each host is +listed exactly as it will appear in the log (i.e. exactly as it will be +resolved by the local syslogd). This command can not be used at the same +time as the +.Em set ignorehosts +command. +.El +.It Sy set replacestr Ao Ar string Ac +.Bl -ohang -offset indent +Set the string to be used when a section of log is blanked out, such +as the pid. By default the string is "___". Anything in parens in a +regular expression is blanked out, as is described below. +.El +.It Sy define queue Ao Ar queue Ac +.Bl -ohang -offset indent +Define a new queue whose name is +.Ao Ar queue Ac . +The following subcommands can be issued after defining a queue. They +pertain to the most recent queue defined. +.It Sy action Ao Ar action Ac Oo Ao Ar arg Ac ... Oc +.Bl -ohang -offset indent +Direct the queue to take specified +.Ao Ar action Ac +when it receives messages. You may use multiple action commands to +specify more than one action. Currently supported values for +.Ao Ar action Ac +are +.Em mail , +.Em zwrite , +and +.Em exec . +The arguments for each are as follows: +.Bl -ohang -offset indent +.It Sy action mail Ao Ar to Ac Ao Ar from Ac Ao Ar subject Ac +.It Sy action zwrite Ao Ar class Ac Ao Ar instance Ac Ao Ar recipient Ac +.It Sy action exec Ao Ar program Ac Oo Ao Ar arg Ac ... Oc +.El +In the case of the exec command the message is piped to the stdin of +the named program. +.El +.It Sy action-limits Ao Ar numlines Ac Ao Ar linelen Ac Ao Ar numhosts Ac Ao Ar hostents Ac +.Bl -ohang -offset indent +Set limits on the size of messages sent by this queue. +.Ao Ar numlines Ac +is the total number of lines in the message. +.Ao Ar linelen Ac +is the maximum length of a line. +.Ao Ar numhosts Ac +is the maximum number of hosts in a message. +.Ao Ar hostents Ac +is the maximum number of logs per host. If the limits set by +.Em numlines , +.Em numhosts , +or +.Em hostents +are exceeded then the message will be truncated appropriately and a +message will be included noting that fact. If +.Em linelen +is exceeded by a line, the final characters will silently be stripped off. +.El +.It Sy fire Ao Ar time Ac +.Bl -ohang -offset indent +Specify how often the queue should send messages. +.Ao Ar time Ac +can be in one of three formats: +.Bl -ohang -offset indent +.It Sy *<num>[m|h|s] +This specifies a repeated interval. For example: +.Em *5m +means to fire every 5 minutes from the time oak was started. +.It Sy <hour>:<min> +This specifies a static time to fire at, using a 24 hour clock. +.Em 17:00 +would fire every day at 5pm. +.It Sy now +This indicates that message should be sent immediately. This option +should almost always be used in conjunction with the +.Em locking +command described below. +.El +.El +.It Sy locking Ao Ar time Ac +.Bl -ohang -offset indent +This option specifies how long a queue should wait after sending a +message before it will send another message that matches the same +regular expression as the first. This is typically used with queues that +fire immediately or at very short intervals. For example, if a queue +were set to page someone on a "file system full" message it would be +desirable to not receive the page every on each successive log of the +error; there would be a flood of pages. If the queue were set to be +.Em locking 30m +then a "file system full" page would be sent at most once every thirty +minutes. +.El +.It Sy header Ao Ar text Ac +.Bl -ohang -offset indent +Set +.Ao Ar text Ac +to be sent at the beginning of the message. +.El +.It Sy prescan +.Bl -ohang -offset indent +This option indicates that the queue should include messages that +are already in the log file. Normally a queue will only pick up new +messages after oak has been started. This option is useful if you want +to restart the oak daemon, but not lose messages for a daily report. It +is not recommended for queues that send frequent messages since with the +.Em prescan +option set those messages will all be sent when oak is started. +.El +.El +.It Sy on Ao Ar regex Ac +.Bl -ohang -offset indent +Specify a regular expression that can be matched. The subcommands +following the +.Em on +command indicate what to do when the expression is matched. Anything in +the regular expression that falls between parenthesis will be blanked +out. +.It Sy queues Ao Ar queuename Ac Oo Ao Ar queuename Ac ... Oc +.Bl -ohang -offset indent +Spool the message being matched into the queues named by +.Ao Ar queuename Ac . +.El +.El +.El +.Pp +.Sh SAMPLE CONFIG FILE +.Bl -ohang +.It A sample config file can be found at +http://www.ktools.org/oak/oak-sample-config-1.txt +.El +.Sh BUGS +Bugs can be reported to <bug-oak@ktools.org>. +.Pp +.Sh SEE ALSO +.Bl -ohang +.It re_format(7) +.It oak homepage +http://www.ktools.org/oak +.It oak-users mailing list +http://www.ktools.org/mailman/listinfo/oak-users/ +.El +.Sh AUTHOR +Oak was written by James Kretchmar (http://www.ktools.org/kretch). diff --git a/sysutils/oak/files/oak.conf b/sysutils/oak/files/oak.conf new file mode 100644 index 00000000000..d025497bc1f --- /dev/null +++ b/sysutils/oak/files/oak.conf @@ -0,0 +1,291 @@ +### +### Oak config file +### + +### +### Options -- See oak man page for a complete list. +### + +set infile /var/log/messages + +# These are on by default, but we'll set them anyway. +# To turn them off change to "set no nukepid", etc. +set nukepid +set nukeciscoid +set nukesmqid + +### +### Define Queues +### + +define queue immediate-mail + # action mail <from> <to> <subject> + action mail root root "Oak Log Report" + fire now + locking 10m + +define queue hourly-mail + action mail root root "Oak Hourly Report" + fire *1hr + header Hourly Message Log + +define queue daily-mail + prescan + action mail root root "Oak Daily Report" + action-limits 300 100 100 100 + fire 00:00 + header Daily Message Log + +define queue immediate-zephyr + # action zwrite <class> <instance> <recipient> + action zwrite myclass oak * + action-limits 25 100 100 10 + fire now + locking 30m + header **** CRITICAL MESSAGE LOG **** + +define queue hourly-zephyr + action zwrite myclass oak * + action-limits 25 100 100 10 + fire *1hr + header Hourly Message Log + +define queue sendpage + #action exec <program> [<args> ...] + action exec pager_program pager_number + fire now + locking 30m + +# Queue 'trash' is implicitly defined. Anything queued to trash is ignored. + +## +## Define queuing rules +## +## Uses regular expressions. Anything in parens gets turned into "___". +## +########################################################################## + +### +### Critical messages first +### + +on ^sendmail\[(.+)\]: (.+): SYSERR.*: (.+): cannot fork: Not enough memory + queues immediate-mail hourly-mail daily-mail +on ^sendmail\[(.+)\]: WorkList for .+ maxed out at .+ + queues immediate-mail hourly-mail daily-mail +on ^unix: WARNING: Sorry, no swap space to grow stack for pid (.+) + queues immediate-mail hourly-mail daily-mail +on file system full + queues immediate-mail hourly-mail daily-mail + +### +### Then throw out the garbage +### + +on ^(.+): -Traceback= .+ + queues trash +on ^(.+): -Process= .Per-minute Jobs., ipl= (.+), pid= (.+) + queues trash +on ^(.+): End of MEMD buffer : (.+) + queues trash +on ^(.+): End of datagram : (.+) + queues trash +on ^(.+): bufhdr .+ + queues trash +on ^(.+): %SYS-5-CONFIG_I: Configured from console by (.+) \((.+)\) + queues trash +on ^(.+): %AT-6-NODEWRONG: .+: AppleTalk node (.+) misconfigured; reply has been broadcast + queues trash +on ^(.+): %AUTORP-5-MAPPING: RP for .+ is now .+ + queues trash +on ^(.+): %AT-5-RTMPSTATE: .+: RTMP Path to (.+) via .+ now in Bad state *(.*) + queues trash +on ^(.+): %AT-5-RTMPSTATE: .+: RTMP Path to (.+) via .+ now in Good state (.*) + queues trash +on ^dhcpd: Abandoning IP address (.+): declined + queues trash +on gethostbyaddr: (.*) != (.+) + queues trash +on ^imapd\[(.+)\]: PROTERR: idle for too long + queues trash +on ^imapd\[(.+)\]: PROTERR: Connection reset by peer + queues trash +on ^kshd\[(.+)\]: Executing .* rcp .* for principal (.*) + queues trash +on ^eklogind\[(.+)\]: ROOT login by (.+) \((.+)\) + queues trash +on ^eklogind\[(.+)\]: Kerberos authentication failed + queues trash +on ^Klogind\[(.+)\]: (.*)login by (.+) \((.+) \((.+)\)\) + queues trash +on ^klogind\[(.+)\]: ROOT login by (.+) \((.+) \((.+)\)\) + queues trash +on ^klogind\[(.+)\]: User (.+) is not authorized to login to account .+ + queues trash +on last message repeated .+ time + queues trash +on ^login\[(.+)\]: ROOT LOGIN .+ + queues trash +on ^login: ROOT LOGIN (.+) FROM (.+) + queues trash +on ^named\[(.+)\]: ns_resp: TCP truncated: (.*) .+ + queues trash +on ^named\[(.+)\]: Broken pipe + queues trash +on ^named\[(.+)\]: fwritemsg: Broken pipe + queues trash +on ^newsyslog\[(.+)\]: logfile turned over + queues trash +on ^ninit\[(.+)\]: named hosed! + queues trash +on ^ninit\[(.+)\]: ...named restarted. + queues trash +on ^ninit\[(.+)\]: Named hosed! Restarting... + queues trash +on ^popper: (.+): \((.+)\) Incorrect network address \(krb_rd_req\) + queues trash +on ^popper: (.+): \((.+)\) Ticket expired \(krb_rd_req\) + queues trash +on ^popper: (.+): \((.+)\) Time is out of bounds \(krb_rd_req\) + queues trash +on ^popper: (.+): \(.*\) Can't decode authenticator \(krb_rd_req\) + queues trash +on ^popper: (.+): EOF + queues trash +on ^popper: (.+): \((.+)\) Service expired \(kerberos\) + queues trash +on ^popper: (.*): timeout waiting for ticket + queues trash +on ^popper: (.*): timeout waiting for data + queues trash +on ^popper: (.+): auth failed: (.+) vs (.+) + queues trash +on ^popper: (.*): \((.*)\) realm not accepted. + queues trash +on ^popper: (.*): \((.*)\) instance not accepted. + queues trash +on ^popper: Unable to obtain socket and address of client, err = 57 + queues trash +on ^popper: (.*): \((.*)\) Generic kerberos error \(kfailure\) + queues trash +on ^quota\[(.+)\]: IOERROR: opening quota file .+: Permission denied + queues trash +on ^mail.local: root: wrong owner \(is 1, should be 0\) + queues trash +on ^sendmail\[(.+)\]: NOQUEUE: SYSERR: .+: line (.+): cannot alias non-local name + queues trash +on ^sendmail\[(.+)\]: third party call from (.+) at (.+) + queues trash +on ^sendmail\[(.+)]: NOQUEUE: SYSERR: getrequests: cannot bind: Address already in use + queues trash +on ^sendmail\[(.+)\]: (.+): collect: premature EOM: Error 0 + queues trash +on ^sendmail\[(.+)\]: (.+): collect: premature EOM: Connection reset by (.+) + queues trash +on ^sendmail\[(.+)\]: (.+): SYSERR\(root\): collect: I/O error on connection from + queues trash +on ^sendmail\[(.+)\]: (.+): SYSERR: prescan: too many tokens + queues trash +on ^sendmail\[(.+)\]: cannot get connection + queues trash +on ^sendmail\[(.+)\]: (.+): SYSERR: putoutmsg \((.+)\): error on output channel sending (.*) + queues trash +on ^sendmail\[(.+)\]: (.+): SYSERR: sendall: too many hops + queues trash +on ^sendmail\[(.+)\]: (.+): SYSERR.*: Too many hops .+ \(.+ max\): from (.*) + queues trash +on ^sendmail\[(.+)\]: (.+): (.+): DATA-2 protocol error: 221 Timeout waiting for input + queues trash +on ^snmpdx: community_check\(\) : bad community from (.+) + queues trash +on ^snmpdx: session_open\(\) failed for a pdu received from (.+) + queues trash +on ^snmpdx: Agent snmpd is now OK + queues trash +on ^syslogd: exiting on signal 15 + queues trash +on ^tcp_forwarder\[(.+)\]: read: s: Connection reset by peer + queues trash +on ^tftpd\[(.+)\]: connect from: (.+) + queues trash +on ^tftpd\[(.+)\]: (.+) requests (.+) + queues trash +on ^tftpd\[(.+)]\: end session: (.+) + queues trash +on ^unix: afs: Lost contact with file server (.+) in cell .+ .* + queues trash +on ^unix: afs: file server (.+) in cell .+ is back up + queues trash +on ^unix: afs: Lost contact with volume location server (.+) in cell .+ + queues trash +on ^unix: afs: Waiting for busy volume (.+) \((.*)\) in cell .+ + queues trash +on ^unix: afs: Waiting for busy volume (.+) in cell .+ + queues trash +on ^unix: Starting AFS cache scan... + queues trash +on ^unix: Memory cache: Allocating (.+) dcache entries... + queues trash +on ^unix: found (.+) non-empty cache files (.+)\. + queues trash +on ^xntpd\[(.+)\]: time reset \(step\) .+ s + queues trash + +### +### Everything else +### + +on ^(.+): %SYS-3-CPUHOG: Task ran for (.+) msec \((.+)\), Process = ARP Input, PC = (.+) + queues hourly-mail daily-mail +on ^(.+): %CLEAR-5-COUNTERS: Clear counter on interface ATM8/0 by vty0 \((.+)\) + queues hourly-mail daily-mail +on ^(.+): %LINEPROTO-5-UPDOWN: Line protocol on Interface .*, changed state to (.*) + queues hourly-mail daily-mail +on ^(.+): %LINK-3-UPDOWN: Interface .*, changed state to (.*) + queues hourly-mail daily-mail +on ^(.+): %AT-1-NOMEM: Could not allocate memory for pdb at line (.+) in .+ + queues hourly-mail daily-mail +on ^(.+): -Process= "IP Input", ipl= (.+), pid= (.+) + queues hourly-mail daily-mail +on ^deliver\[(.+)\]: .+ quota file (.+): No space + queues hourly-mail daily-mail +on ^deliver\[(.+)\]: .+: unable to record (.+) of (.+) bytes in quota file (.+) + queues hourly-mail daily-mail +on ^imapd\[(.+)\]: stating header for (.+): No such file or directory + queues hourly-mail daily-mail +on ^imapd\[(.+)]: .*stating (.+): No such file or directory + queues hourly-mail daily-mail +on ^pop3d\[(.+)\]: .+: .+ quota file (.+): No space + queues hourly-mail daily-mail +on ^pop3d\[(.+)\]: .+: unable to record .+ of (.+) bytes in quota (.+) + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: SYSERR.*: /usr/local/sendmail/etc/aliases.new: line (.+): readaliases + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): (.+): SMTP DATA-2 protocol error: 501 Badly structu + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): SYSERR(.*): (.+) config error: mail loops back to me + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): SYSERR(.*): deliver: mci=(.+) rcode=(.+) errno=(.+) state=(.+) + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): SYSERR(.*): timeout writing message to (.+) + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): collect: premature EOM: Connection timed out with (.+) + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): SYSERR: Cannot open (.+): No such file or directory + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): SYSERR: (.+): line (.+): readqf: cannot open (.+): No such file or directory + queues hourly-mail daily-mail +on ^sendmail\[(.+)\]: (.+): SYSERR: putoutmsg \((.+)\): error on output channel sending .* + queues hourly-mail daily-mail +on ^snmpdx: session_open.. failed for a pdu received from (.+) + queues hourly-mail daily-mail +on ^unix: afs: volume location server (.+) in cell .+ is back up + queues hourly-mail daily-mail +on ^unix: afs: Lost contact with file server (.+) in cell .+ + queues hourly-mail daily-mail +on ^vmunix: afs: Lost contact with file server (.+) in cell .+ + queues hourly-mail daily-mail +on ^vmunix: afs: file server (.+) in cell .+ is back up + queues hourly-mail daily-mail +on .* + queues hourly-mail daily-mail diff --git a/sysutils/oak/files/oak.sh b/sysutils/oak/files/oak.sh new file mode 100644 index 00000000000..d704f998b53 --- /dev/null +++ b/sysutils/oak/files/oak.sh @@ -0,0 +1,17 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# oak - Jason White <jdwhite@jdwhite.org> +# +# PROVIDE: oak +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="oak" +rcvar=$name +command="@PREFIX@/bin/oak" +command_args="-c @PKG_SYSCONFDIR@/oak.conf" +required_files="@PKG_SYSCONFDIR@/oak.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/oak/patches/patch-aa b/sysutils/oak/patches/patch-aa new file mode 100644 index 00000000000..f1a4ed648e6 --- /dev/null +++ b/sysutils/oak/patches/patch-aa @@ -0,0 +1,19 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $ + +--- Makefile.in 2005-02-27 12:54:53.000000000 -0600 ++++ Makefile.in 2006-02-04 14:36:44.000000000 -0600 +@@ -1,3 +1,5 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ + CC=@CC@ + CFLAGS=-g -Wall + OBJS=action.o matchline.o oak.o queuelist.o fire.o queue.o util.o list.o global.o readconfig.o text.o queue_entry.o string.o +@@ -7,7 +7,7 @@ + $(CC) -o oak $(OBJS) $(LIBS) + + install: +- ./install-sh -c oak /usr/local/bin/ ++ ./install-sh -c oak @bindir@/ + + clean: + $(RM) *~ *.o oak diff --git a/sysutils/oak/patches/patch-ab b/sysutils/oak/patches/patch-ab new file mode 100644 index 00000000000..2a38b11f34f --- /dev/null +++ b/sysutils/oak/patches/patch-ab @@ -0,0 +1,22 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $ + +--- action.c 2005-02-27 12:54:53.000000000 -0600 ++++ action.c 2006-02-04 14:40:27.000000000 -0600 +@@ -58,7 +58,7 @@ + + if (act->argc<1) return; + +- if (!oak_global_is_debug(&g)) { ++ if (!oak_global_is_debug(&g) && !oak_global_is_quit(&g)) { + i=fork(); + if (i) { + wait3(NULL, WNOHANG, NULL); +@@ -117,7 +120,7 @@ + /* it didn't end, so we'll just take what we got */ + } + } else { +- strcpy(subject, act->argv[3]); ++ strncpy(subject, act->argv[3], sizeof(subject)-1); + } + + file=popen(command, "w"); diff --git a/sysutils/oak/patches/patch-ac b/sysutils/oak/patches/patch-ac new file mode 100644 index 00000000000..a52c4899f9a --- /dev/null +++ b/sysutils/oak/patches/patch-ac @@ -0,0 +1,22 @@ +$NetBSD: patch-ac,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $ + +--- global.c 2005-02-27 12:54:53.000000000 -0600 ++++ global.c 2006-02-04 14:38:45.000000000 -0600 +@@ -48,7 +50,7 @@ + + void oak_global_set_logfile(oak_global *g, char *filename) + { +- strcpy(g->logfile, filename); ++ strncpy(g->logfile, filename, sizeof(g->logfile)-1); + } + + oak_queuelist *oak_global_get_queuelist(oak_global *g) +@@ -113,7 +115,7 @@ + + void oak_global_set_replacestr(oak_global *g, char *in) + { +- strcpy(g->replacestr, in); ++ strncpy(g->replacestr, in, sizeof(g->replacestr)-1); + } + + int oak_global_host_is_ok(oak_global *g, char *host) |