[syslog-ng]Syslog.conf translator

Balazs Scheidler bazsi@balabit.hu
Wed, 2 May 2001 11:47:49 +0200


On Tue, May 01, 2001 at 06:01:41PM -0500, Jon Marks wrote:
> Hi,
> 
> In order to make the transition to syslog-ng easier for people, I thought
> it might be useful to have an automated translation from the old
> syslog.conf to a working syslog-ng.conf. I came up with an awk script
> which works OK for me. I was targeting Solaris and AIX specifically, but
> off-hand, RedHat linux syslogd looks the same and I presume other UNIX
> variants' do, too. Try it, it could work ;)
> 
> In particular, there are three things to look out for
> if you're interested in porting this to another UNIX platform:
> 
> 1) Change the local log device if necessary, from /dev/log to whatever
>    it's supposed to be.
> 
> 2) Change the device type (i.e. the syslog-ng.conf directive) for the
>    local log device. The script checks 'uname' for SunOS and AIX and
>    sets an appropriate variable; just add to that detection mechanism. 
>    A variable would do nicely for the log device, too, but they've got
>    the same name in AIX and Solaris so I didn't worry about it. (I'm not
>    using the "door" device).
> 
> 3) The script is an awk script, but its invoked by ksh. It's easy
>    to rearrange it so that it's invoked directly as awk, but for what
>    I plan to do with it, I didn't need that. In either case, ksh won't
>    be available on many linux distros, I think, so just change the
>    shell to bash or something. (In this case, I hope the shell you pick
>    is lenient about newlines within a quoted command line argument!)


I'd add this script to the contrib subdirectory if you don't mind.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1