Date: Tue, 25 Oct 2005 12:50:17 +0400 From: Sergey Matveychuk <sem@FreeBSD.org> To: Alex Samorukov <samm@os2.kiev.ua> Cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/87972: ports [mail/exilog] - fix for the exilog.sh rc script to make "status" and "restart" command work correctly Message-ID: <435DF1C9.4020705@FreeBSD.org> In-Reply-To: <200510250820.j9P8KUQ3051887@freefall.freebsd.org> References: <200510250820.j9P8KUQ3051887@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Alex Samorukov wrote: > The following reply was made to PR ports/87972; it has been noted by GNATS. > > From: Alex Samorukov <samm@os2.kiev.ua> > To: bug-followup@FreeBSD.org, samm@os2.kiev.ua > Cc: > Subject: Re: ports/87972: ports [mail/exilog] - fix for the exilog.sh rc script > to make "status" and "restart" command work correctly > Date: Tue, 25 Oct 2005 11:19:20 +0300 > > After this patch we dont need special action for the "stop" command, so > here is a corrected diff: > > --- exilog.sh.ori Tue Oct 25 10:53:50 2005 > +++ exilog.sh Tue Oct 25 11:11:36 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,17 +16,10 @@ > 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 > : ${exilog_enable="NO"} > > -case $1 in > - stop) > - kill `cat $pidfile` > - rm -f $pidfile > - ;; > - *) > - run_rc_command "$1" > - ;; > -esac > +run_rc_command "$1" It's not a rcNG style. Mixing styles is not a good idea. You can read a great yar's article about rcNG scripting: http://people.freebsd.org/~yar/rcng/article.html -- Sem.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?435DF1C9.4020705>