blob: ea3ff5b336216f905b4ac4d10cd8aac0482cdeaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
$NetBSD: patch-ac,v 1.1.1.1 2006/05/14 19:56:05 adrianp Exp $
# add NetBSD support and fix some paths
--- contrib/syslog2ng.orig Thu Jun 19 14:24:03 2003
+++ contrib/syslog2ng Thu Jun 19 14:24:13 2003
@@ -5,18 +5,24 @@
# Translator from syslog.conf to syslog-ng.conf
# by Jonathan W. Marks <j-marks@uiuc.edu>
#
-# Rev 2
+# Rev 2.1
BEGIN {
# Handle the various platforms- determine proper log device
- "/bin/uname -s" | getline sysname;
- close("/bin/uname -s");
+ "/usr/bin/uname -s" | getline sysname;
+ close("/usr/bin/uname -s");
if (sysname == "SunOS") {
LOGDEVTYPE="sun-streams";
+ LOGDEVPATH="/dev/log";
} else if (sysname == "AIX") {
LOGDEVTYPE="unix-dgram";
+ LOGDEVPATH="/dev/log";
} else if (sysname == "Linux") {
LOGDEVTYPE="unix-stream";
+ LOGDEVPATH="/dev/log";
+ } else if (sysname == "NetBSD") {
+ LOGDEVTYPE="unix-dgram";
+ LOGDEVPATH="/var/run/log";
} else {
print "!!! Unsupported system: " sysname ".";
exit 1;
@@ -29,7 +35,7 @@
print \
"source local {\n" \
-" " LOGDEVTYPE "(\"/dev/log\");\n" \
+" " LOGDEVTYPE "(\"" LOGDEVPATH "\");\n" \
" udp(ip(0.0.0.0) port(514));\n" \
" internal();\n" \
"};\n";
|