$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 # -# 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";