Re: [syslog-ng] syslog-ng gets started twice when system reboots
I looked both /etc/rc.d/rc3.d and /etc/rc.d/rc5.d, and other rcx.d directories. Only one "S" script for syslog-ng and it's symbolic link to /etc/init.d/syslog-ng. All files under rcx.d directory are symbolic links. Do you know if the first occurance of "Starting syslog-ng:" or "Stopping syslog-ng:" comes from syslog-ng binary file? Thanks Xuan
Date: Thu, 18 Feb 2010 11:09:55 -0600 From: wes.hardin@maxim-ic.com To: syslog-ng@lists.balabit.hu Subject: Re: [syslog-ng] syslog-ng gets started twice when system reboots
On 02/17/2010 09:59 AM, Xuan Zhong wrote:
I use the stable version syslog-ng-3.0.5-1.rhel5.x86_64.rpm downloaded from your website. It starts/stops twice only when the system reboots. The init script is only generated once. The second "Starting syslog-ng: [ok]" was generated by init script because I modified the init script text display and only the second start changed. Not sure where the first start comes from.
Starting syslog-ng: Starting syslog-ng: [ok] [ok]
When the system shuts down, I saw the following: Stopping syslog-ng: Stopping syslog-ng: [ok] [ok]
Similarly, only the second "Stopping syslog-ng:" comes from the syslog-ng service script.
Look in /etc/rc.d/rc{3,5}.d for multiple "S" scripts for syslog-ng. Everything in the rc?.d directories is typically a symlink to a similarly named script in /etc/rc.d/init.d (usually a relative link like ../init.d/script).
If there is a file that isn't a symlink or doesn't link to an initscript in /etc/rc.d/init.d, that should be considered suspicious. -- /* Wes Hardin */
_________________________________________________________________ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/201469226/direct/01/
On Thu, 2010-02-18 at 18:24 +0000, Xuan Zhong wrote:
I looked both /etc/rc.d/rc3.d and /etc/rc.d/rc5.d, and other rcx.d directories. Only one "S" script for syslog-ng and it's symbolic link to /etc/init.d/syslog-ng. All files under rcx.d directory are symbolic links.
Do you know if the first occurance of "Starting syslog-ng:" or "Stopping syslog-ng:" comes from syslog-ng binary file?
No, it doesn't. It is printed by the init script. Can you post the "sh -x" output that Folti has requested in his previous mail? -- Bazsi
Here is the output of sh +x /etc/init.d/syslog-ng start: ++ uname -s + OS=Linux + SYSLOGNG_PREFIX=/opt/syslog-ng + SYSLOGNG=/opt/syslog-ng/sbin/syslog-ng + CONFFILE=/opt/syslog-ng/etc/syslog-ng.conf + PIDFILE=/opt/syslog-ng/var/run/syslog-ng.pid + SYSLOGPIDFILE=/var/run/syslog.pid + SLNG_INIT_FUNCTIONS=/opt/syslog-ng/lib/init-functions + MAXWAIT=30 + SUBSYSDIR=/var/lock/subsys + retval=0 + test -x /opt/syslog-ng/sbin/syslog-ng + test -r /opt/syslog-ng/etc/syslog-ng.conf + '[' -f /etc/lsb-release ']' + '[' -f /etc/redhat-release ']' + SYSLOGPIDFILE=/var/run/syslogd.pid + '[' Linux = SunOS ']' + '[' Linux = Solaris ']' + . /opt/syslog-ng/lib/init-functions ++ RED= ++ YELLOW= ++ NORMAL= ++ FANCYTTY= ++ PSOPTS= ++ ECHO=echo +++ uname -s ++ OS=Linux ++ '[' -f /lib/lsb/init-functions ']' ++ . /lib/lsb/init-functions ++ unalias start_daemon ++ unalias killproc ++ unalias pidofproc ++ case $OS in ++ '[' -z '3.1.17(1)-release' ']' + case "$OS" in + SYSLOGNG_OPTIONS=--no-caps + '[' -r /etc/default/syslog-ng ']' + '[' -r /etc/sysconfig/syslog-ng ']' + '[' -r /opt/syslog-ng/etc/default/syslog-ng ']' + case $OS in + case "x$CONSOLE_LOG_LEVEL" in + create_xconsole + grep -v '^#' /opt/syslog-ng/etc/syslog-ng.conf + grep /dev/xconsole + case "$1" in + syslogng_start + echo_n 'Starting syslog-ng: ' + case "$OS" in + echo -n 'Starting syslog-ng: ' Starting syslog-ng: ++ head -1 ++ pidofproc -p /opt/syslog-ng/var/run/syslog-ng.pid /opt/syslog-ng/sbin/syslog-ng ++ proc= ++ pidfile= ++ '[' -p = -p ']' ++ pidfile=/opt/syslog-ng/var/run/syslog-ng.pid ++ shift ++ shift ++ '[' -z /opt/syslog-ng/sbin/syslog-ng ']' ++ proc=/opt/syslog-ng/sbin/syslog-ng ++ shift +++ basename /opt/syslog-ng/sbin/syslog-ng ++ base=syslog-ng ++ '[' -z /opt/syslog-ng/var/run/syslog-ng.pid ']' ++ '[' -f /opt/syslog-ng/var/run/syslog-ng.pid ']' ++ return 4 + PID= + '[' -n '' ']' + start_daemon -f -p /opt/syslog-ng/var/run/syslog-ng.pid /opt/syslog-ng/sbin/syslog-ng --no-caps + proc= + pidfile= + force= + nice= + '[' -f = -f ']' + force=force + shift + '[' -p = -n ']' + '[' -p = -p ']' + pidfile=/opt/syslog-ng/var/run/syslog-ng.pid + shift + shift + '[' -z /opt/syslog-ng/sbin/syslog-ng ']' + proc=/opt/syslog-ng/sbin/syslog-ng + shift ++ basename /opt/syslog-ng/sbin/syslog-ng + base=syslog-ng + '[' -z /opt/syslog-ng/var/run/syslog-ng.pid ']' + _pid_from_pidfile /opt/syslog-ng/var/run/syslog-ng.pid syslog-ng + pidfile=/opt/syslog-ng/var/run/syslog-ng.pid + procname=syslog-ng + pid= + '[' -f /opt/syslog-ng/var/run/syslog-ng.pid ']' + return 3 + '[' -n '' ']' + /opt/syslog-ng/sbin/syslog-ng --no-caps + return 0 + retval=0 + returnmessage 0 + _rval=0 + is_debian=0 + case "$OS" in ++ cat /etc/issue ++ grep Debian + res= + is_debian=1 + '[' 0 -ne 0 ']' + '[' 1 -eq 0 ']' + log_success_msg + /etc/redhat-lsb/lsb_log_message success [ OK ] + '[' 0 -eq 0 ']' + '[' Linux = Linux ']' + '[' -d /var/lock/subsys ']' + touch /var/lock/subsys/syslog-ng + '[' -h /var/run/syslogd.pid ']' + '[' '!' -f /var/run/syslogd.pid ']' + ln -s /opt/syslog-ng/var/run/syslog-ng.pid /var/run/syslogd.pid + return 0 + exit 0
From: bazsi@balabit.hu To: syslog-ng@lists.balabit.hu Date: Sat, 20 Feb 2010 10:15:38 +0100 CC: wes.hardin@maxim-ic.com Subject: Re: [syslog-ng] syslog-ng gets started twice when system reboots
On Thu, 2010-02-18 at 18:24 +0000, Xuan Zhong wrote:
I looked both /etc/rc.d/rc3.d and /etc/rc.d/rc5.d, and other rcx.d directories. Only one "S" script for syslog-ng and it's symbolic link to /etc/init.d/syslog-ng. All files under rcx.d directory are symbolic links.
Do you know if the first occurance of "Starting syslog-ng:" or "Stopping syslog-ng:" comes from syslog-ng binary file?
No, it doesn't. It is printed by the init script. Can you post the "sh -x" output that Folti has requested in his previous mail?
-- Bazsi
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
_________________________________________________________________ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. http://clk.atdmt.com/GBL/go/201469229/direct/01/
participants (2)
-
Balazs Scheidler
-
Xuan Zhong