|
From: Friedrich L. <fl...@fl...> - 2002-03-08 22:49:02
|
Friedrich Lobenstock wrote:
>
> Heiko Zuerker wrote:
> >
> > E.g. I have to modify this line
> > source src { unix-dgram("/dev/log"); internal(); file("/proc/kmsg"); };
> > and add the string 'unix-dgram("/jail/ISC_BIND/dev/log"); ' within the { }
> > brackets. I was thinking to have a file syslog-ng.conf.master, which I
> > modify and save as syslog-ng.conf.
>
> How about this
>
> sed -e "s|^source src {|source src { unix-dgram("/jail/ISC_BIND/dev/log");|" < syslog-ng.conf > tmpfile
> mv tmpfile syslog-ng.conf
Removing with
sed -e "s| unix-dgram("/jail/ISC_BIND/dev/log");||" < syslog-ng.conf > tmpfile
mv tmpfile syslog-ng.conf
Proof of concept:
# cat x;sed -e "s|^source src {|source src { unix-dgram("/jail/ISC_BIND/dev/log");|" \
< x > y; cat y;sed -e "s| unix-dgram("/jail/ISC_BIND/dev/log");||" < y
source src { unix-dgram("/dev/log"); internal(); file("/proc/kmsg"); };
source src { unix-dgram(/jail/ISC_BIND/dev/log); unix-dgram("/dev/log"); internal(); file("/proc/kmsg"); };
source src { unix-dgram("/dev/log"); internal(); file("/proc/kmsg"); };
--
MfG / Regards
Friedrich Lobenstock
____________________________________________________________________
Friedrich Lobenstock FL226-RIPE Internetservices
URL: http://www.fl.priv.at/ Email: fl...@fl...
____________________________________________________________________
|