[syslog-ng] program destination and init??

Thomas Wollner tw at wollner-net.de
Wed Nov 30 11:50:14 CET 2011


Hi,

currently I`m using syslog-ng 3.3.3 from madhouse package. In addition  
to the behaviour with the dash shell I found out that 3.3.3 does not  
handle signalling to scripts spawned by program destination.


Example:

in 3.1.3 this was a valid config statement:

destination d_raw_firewall_sec {
  program("`/opt/sec/bin/secStart firewall`"
  template(t_sec_template));
};

Have a look at the backticks inside the program.

After changing /bin/dash nach /bin/bash everything worked fine.


in 3.3.3. I have to change from backtick to $(...) style:

destination d_raw_firewall_sec {
  program("$(/opt/sec/bin/secStart firewall)"
  template(t_sec_template));
};

This works, but upon restart / reload of syslog-ng the "old" spawned  
scripts are not receiving the kill / term / hup signals and stay in  
the process list of the system until killed manually.


The $(/opt/sec/bin/secStart firewall) evaluates to the following:

  "/opt/sec/bin/sec.pl -conf=/opt/sec/rules/firewall.rule  
-pid=/opt/sec/var/run/sec-firewall.pid  
-dump=/opt/sec/dump/sec-firewall.dump -debug=5 -syslog=local1  
-intcontexts -intevents -input=-"



If you need more information please let me know.

best regards,

Tom





Zitat von Gergely Nagy <algernon at balabit.hu>:

> Thomas Wollner <tw at wollner-net.de> writes:
>
>> I had a similar situation on debian squeeze a while ago. in debian 6
>> the default system shell is dash and syslog-ng hands over program
>> destinations to the standard system shell.
>> I changed the /bin/sh link from /bin/dash to /bin/bash and everything
>> works as expected.
>
> Ooh, this is interesting. Thanks for figuring this out, I'll see if I
> can figure out how to make it work with dash too. (Or if it's a bug in
> dash that should be fixed)
>
> --
> |8]
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:   
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the syslog-ng mailing list