Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2005 11:07:04 +0300
From:      "Alex Samorukov" <samm@os2.kiev.ua>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Cc:        samm@os2.kiev.ua
Subject:   ports/87972: ports [mail/exilog] - fix for the exilog.sh rc script to make "status" and "restart" command work correctly
Message-ID:  <1130227624.0@samm.loc>
Resent-Message-ID: <200510250810.j9P8ADPl050885@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         87972
>Category:       ports
>Synopsis:       ports [mail/exilog] - fix for the exilog.sh rc script to make "status" and "restart" command work correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 25 08:10:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Alex Samorukov
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
Shevchenko Didkovskiy and Partners 
>Environment:


System: FreeBSD 5.4-STABLE #15: Mon Aug  8 10:59:05 EEST 2005
    root@samm.loc:/usr/obj/usr/src/sys/SAMMKRNL



>Description:


Now "status" and "restart" command will not work correctly in exilog.sh rc script. This is because of 2 reasons:
1) By default exilog daemon change process name, so rc.subr functions dont beleive that exilog process is a owner of the pidfile. This can be changed in the exilog.conf ('use_pretty_names' => 'no')
2) exilog_agent.pl is a perl script, so we need to add string command_interpreter=/usr/bin/perl. 



>How-To-Repeat:


run 
# /usr/local/etc/rc.d/exilog.sh start
# /usr/local/etc/rc.d/exilog.sh status
you will get a message "exilog is not running"




>Fix:


# diff -u exilog.sh.ori exilog.sh 
--- exilog.sh.ori       Tue Oct 25 10:53:50 2005
+++ exilog.sh   Tue Oct 25 11:03:37 2005
@@ -5,6 +5,8 @@
 # Add the following lines to /etc/rc.conf to enable exilog agent:
 #
 #exilog_enable="YES"
+# 
+# also uncomment  'use_pretty_names' => 'no' in exilog.conf file
 
 . %%RC_SUBR%%
 
@@ -14,6 +16,7 @@
 command=%%PREFIX%%/sbin/exilog_agent.pl
 pidfile=/var/run/exilog.pid
 required_files=%%PREFIX%%/etc/exilog.conf
+command_interpreter=/usr/bin/perl
 
 # read settings, set default values
 load_rc_config $name



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1130227624.0>