Re: cvs commit: ports/irc/bitlbee/files bitlbee.in

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Thu, 17 Sep 2009 11:56:20 -0700
Henrik Brix Andersen wrote:
> brix        2009-09-13 10:35:23 UTC
> 
>   FreeBSD ports repository
> 
>   Modified files:
>     irc/bitlbee/files    bitlbee.in 
>   Log:
>   - Use -u ${user} option to bitlbee instead of su in rc.d script
>   
>   PR:             ports/138268  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=138268
>   Submitted by:   garga
>   
>   Revision  Changes    Path
>   1.4       +2 -2      ports/irc/bitlbee/files/bitlbee.in
> 
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/irc/bitlbee/files/bitlbee.in.diff?&r1=1.3&r2=1.4&f=h

With this change the script can be further simplified as attached.
LOGIN is needed instead of DAEMON since it's running as a specific
user. We also generally prefer that ports stuff uses LOGIN unless
something earlier is needed.


hth,

Doug

-- 

    This .signature sanitized for your protection


--- /usr/ports/irc/bitlbee/files/bitlbee.in	2009-09-14 13:04:11.000000000 -0700
+++ bitlbee.in	2009-09-17 11:53:39.000000000 -0700
_at__at_ -3,7 +3,7 _at__at_
 # $FreeBSD: ports/irc/bitlbee/files/bitlbee.in,v 1.4 2009/09/13 10:35:23 brix Exp $
 #
 # PROVIDE: bitlbee
-# REQUIRE: DAEMON
+# REQUIRE: LOGIN
 # KEYWORD: shutdown
 
 # Add the following lines to /etc/rc.conf to enable bitlbee:
_at_@ -23,12 +23,6 @@
 
 required_files="${bitlbee_config}"
 command="%%PREFIX%%/sbin/bitlbee"
-start_cmd="bitlbee_start"
-
-bitlbee_start()
-{
-	echo "Starting ${name}."
-	${command} -D -u ${bitlbee_user} -c ${bitlbee_config} ${bitlbee_flags}
-}
+command_args="-D -u ${bitlbee_user} -c ${bitlbee_config}"
 
 run_rc_command "$1"
Received on Thu Sep 17 2009 - 18:56:32 UTC