ports/87972: ports [mail/exilog] - fix for the exilog.sh rc script to make "status" and "restart" command work correctly
Sergey Matveychuk
sem at FreeBSD.org
Tue Oct 25 08:50:22 UTC 2005
Alex Samorukov wrote:
> The following reply was made to PR ports/87972; it has been noted by GNATS.
>
> From: Alex Samorukov <samm at os2.kiev.ua>
> To: bug-followup at FreeBSD.org, samm at 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.
More information about the freebsd-ports-bugs
mailing list