-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2008-03-07 Tamas Pal <[email protected]> * configure.in: Added O_LARGEFILE checking macro. Removed linuxism. Added Freebsd specific options to GLIB_LIBS. * contib/Makefile.am: Added the contents of freebsd-contrib to EXTRA_DIST * contrib/freebsd-packaging/syslog-ng.conf.example: Added example config file. * contrib/freebsd-packaging/syslog-ng.rc.d: Added rc.d file(/etc/init.d for you SysV types:) * tgzbuild/configure_opts: Added --bindir options to install loggen to its proper place. * tgzbuild/postbuild: Added FreeBSD specific postinst stuff. Added loggen to Linux's strip. * src/affile.c: Moved O_LARGEFILE declaration to syslog-ng.h * src/afsql.c: Added #include <string.h>. * src/syslog-ng.h: Moved O_LARGEFILE declaration here. * src/afuser.c: Includes util.h ig getutent missing on the system.
- Loading branch information
Showing
10 changed files
with
214 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# defauld syslogd config converted from freebsd 6.1 | ||
|
||
options { dir_perm(0755); perm(0644); | ||
chain_hostnames(no); | ||
keep_hostname(yes); | ||
}; | ||
|
||
# Default local source. | ||
source local { | ||
unix-dgram("/var/run/log"); | ||
unix-dgram("/var/run/logpriv" perm(0600)); | ||
file("/dev/klog"); | ||
udp(ip(0.0.0.0) port(514)); | ||
internal(); | ||
}; | ||
|
||
# FILTERS: START | ||
# Filter LEGO bricks to build your castle :) | ||
# syslog level filters | ||
filter f_crit_emerg { level(crit..emerg); }; | ||
filter f_err_emerg { level(err..emerg); }; | ||
filter f_warn_emerg { level(warning..emerg); }; | ||
filter f_debug_emerg { level(debug..emerg); }; | ||
filter f_notice_emerg { level(notice..emerg); }; | ||
filter f_info_emerg { level(info..emerg); }; | ||
filter f_info { level(info); }; | ||
filter f_not_authpriv { not facility(authpriv); }; | ||
filter f_debug { level(debug); }; | ||
filter f_emerg { level(emerg); }; | ||
|
||
# Facility filters | ||
filter f_mail { facility(mail); }; | ||
filter f_kern { facility(kern); }; | ||
filter f_auth { facility(auth); }; | ||
filter f_lpr { facility(lpr); }; | ||
filter f_news { facility(news); }; | ||
filter f_kern { facility(kern); }; | ||
filter f_security { facility(security); }; | ||
filter f_auth{ facility(auth); }; | ||
filter f_authpriv { facility(authpriv); }; | ||
filter f_ftp { facility(ftp); }; | ||
filter f_cron { facility(cron); }; | ||
|
||
# program filters | ||
filter f_startslip { program("startslip"); }; | ||
filter f_ppp { program("ppp"); }; | ||
## FILTERS: END | ||
|
||
# DESTINATIONS: START | ||
destination d_devconsole { file("/dev/console" create_dirs(yes)); }; | ||
destination d_messages { file("/var/log/messages" create_dirs(yes)); }; | ||
destination d_maillog { file("/var/log/maillog" create_dirs(yes)); }; | ||
destination d_security { file("/var/log/security" create_dirs(yes)); }; | ||
destination d_authlog { file("/var/log/auth.log" create_dirs(yes)); }; | ||
destination d_ldperr { file("/var/log/lpd-errs" create_dirs(yes)); }; | ||
destination d_xferlog { file("/var/log/xferlog" create_dirs(yes)); }; | ||
destination d_cron { file("/var/log/cron" create_dirs(yes)); }; | ||
destination d_debuglog { file("/var/log/debug.log" create_dirs(yes)); }; | ||
destination d_usertty { usertty("*"); }; | ||
destination d_slip { file("/var/log/slip.log" create_dirs(yes)); }; | ||
destination d_ppp { file("/var/log/ppp.log" create_dirs(yes)); }; | ||
# DESTINATIONS: END | ||
|
||
# LOGS: START | ||
# *.err;kern.warning;auth.notice;mail.crit /dev/console | ||
log { source(local); filter(f_mail); filter(f_crit_emerg); destination(d_devconsole); }; | ||
log { source(local); filter(f_err_emerg); destination(d_devconsole); }; | ||
log { source(local); filter(f_kern); filter(f_warn_emerg); destination(d_devconsole); }; | ||
log { source(local); filter(f_auth); filter(f_notice_emerg); destination(d_devconsole); }; | ||
|
||
# *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages | ||
log { source(local); filter(f_notice_emerg); filter(f_not_authpriv); destination(d_messages); }; | ||
log { source(local); filter(f_lpr); filter(f_info); destination(d_messages); }; | ||
log { source(local); filter(f_mail); filter(f_crit_emerg); destination(d_messages); }; | ||
log { source(local); filter(f_news); filter(f_err_emerg); destination(d_messages); }; | ||
log { source(local); filter(f_kern); filter(f_debug_emerg); destination(d_messages); }; | ||
|
||
# mail.info /var/log/maillog | ||
log { source(local); filter(f_mail); filter(f_info_emerg); destination(d_maillog); }; | ||
|
||
## security.* /var/log/security | ||
log { source(local); filter(f_security); filter(f_debug_emerg); destination(d_security); }; | ||
|
||
# auth.info;authpriv.info /var/log/auth.log | ||
log { source(local); filter(f_auth); filter(f_info_emerg); destination(d_authlog); }; | ||
log { source(local); filter(f_authpriv); filter(f_info_emerg); destination(d_authlog); }; | ||
|
||
# lpr.info /var/log/lpd-errs | ||
log { source(local); filter(f_lpr); filter(f_info); destination(d_ldperr); }; | ||
|
||
# ftp.info /var/log/xferlog | ||
log { source(local); filter(f_ftp); filter(f_info_emerg); destination(d_xferlog); }; | ||
|
||
# cron.* /var/log/cron | ||
log { source(local); filter(f_cron); filter(f_debug_emerg); destination(d_cron); }; | ||
|
||
## *.=debug /var/log/debug.log | ||
log { source(local); filter(f_debug); destination(d_debuglog); }; | ||
|
||
## *.emerg * | ||
log { source(local); filter(f_emerg); destination(d_usertty); }; | ||
|
||
# !starslip | ||
# *.* /var/log/slip.log | ||
log { source(local); filter(f_startslip); destination(d_slip); }; | ||
|
||
# !ppp | ||
# *.* /var/log/ppp.log | ||
log { source(local); filter(f_ppp); destination(d_ppp); }; | ||
# LOGS: END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/sh | ||
|
||
# startup script for FreeBSD 6.x. | ||
# Written by Tamas Pal <[email protected]> | ||
|
||
# PROVIDE: syslogd | ||
# REQUIRE: mountcritremote cleanvar newsyslog | ||
# BEFORE: SERVERS | ||
|
||
# Enabling syslog-ng: | ||
# * copy this script to /etc/rc.d or /usr/local/etc/rc.d | ||
# * Edit /etc/rc.conf and add the following lines: | ||
# ----- CUT HERE ----- | ||
# syslogd_enable="NO" | ||
# syslogng_enable="YES" | ||
# syslogng_flags="" | ||
# ----- CUT HERE ----- | ||
# * Add your extra flags to syslogng_flags EXCEPT the -p <pidfile> and -f | ||
# <conffile> flags. These are added automatically by this script. To set | ||
# their value, change the value of the conf_file and pidfile variables below | ||
|
||
. "/etc/rc.subr" | ||
|
||
name="syslogng" | ||
|
||
rcvar=`set_rcvar` | ||
pidfile="/var/run/syslog-ng.pid" | ||
|
||
## CONFIG OPTIONS: START | ||
# modify them according to your environment. | ||
installdir="/opt/syslog-ng" | ||
localstatedir="${installdir}/var" | ||
libpath="${installdir}/lib" | ||
conf_file="${installdir}/etc/syslog-ng.conf" | ||
## CONFIG OPTIONS: END | ||
|
||
command="${installdir}/sbin/syslog-ng" | ||
required_files="$conf_file" | ||
|
||
start_precmd="syslog_ng_precmd" | ||
extra_commands="reload" | ||
|
||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$libpath | ||
export LD_LIBRARY_PATH | ||
|
||
syslog_ng_precmd() { | ||
if [ ! -d ${localstatedir} ]; then | ||
mkdir -p ${localstatedir} | ||
fi | ||
|
||
if [ ! -L /dev/log ]; then | ||
ln -s /var/run/log /dev/log | ||
fi | ||
} | ||
|
||
load_rc_config "$name" | ||
|
||
case $1 in | ||
start) | ||
syslogng_flags=" -p ${pidfile} -f ${conf_file} ${syslog_ng_flags}" | ||
;; | ||
esac | ||
|
||
run_rc_command "$1" | ||
|
||
# vim: ft=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
#include "apphook.h" | ||
|
||
#include <dbi/dbi.h> | ||
#include <string.h> | ||
|
||
typedef struct _AFSqlField | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,5 +63,8 @@ | |
# endif | ||
#endif | ||
|
||
#if !HAVE_O_LARGEFILE | ||
#define O_LARGEFILE 0 | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
--sysconfdir /opt/syslog-ng/etc --localstatedir=/opt/syslog-ng/var --mandir /opt/syslog-ng/man --sbindir=/opt/syslog-ng/sbin/ --enable-ssl | ||
--sysconfdir /opt/syslog-ng/etc --localstatedir=/opt/syslog-ng/var --mandir /opt/syslog-ng/man --bindir=/opt/syslog-ng/bin/ --sbindir=/opt/syslog-ng/sbin/ --enable-ssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters