Date: Fri, 2 Apr 2010 16:02:25 GMT From: Toomas Aas <toomas@tarkvarastuudio.ee> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/145295: www/ruby-cruisecontrolrb installs a non-working rc.d script Message-ID: <201004021602.o32G2PQ0011010@www.freebsd.org> Resent-Message-ID: <201004021610.o32GABMd040209@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 145295 >Category: ports >Synopsis: www/ruby-cruisecontrolrb installs a non-working rc.d script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 02 16:10:11 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Toomas Aas >Release: 6.4 >Organization: >Environment: FreeBSD mail.tarkvarastuudio.ee 6.4-RELEASE-p4 FreeBSD 6.4-RELEASE-p4 #2: Tue Oct 13 08:03:57 EEST 2009 toomas@mail.tarkvarastuudio.ee:/usr/obj/usr/src/sys/TVS amd64 >Description: After installing the www/ruby-cruisecontrolrb port, setting cruisecontrolrb_enable="YES" in /etc/rc.conf and issuing the command /usr/local/etc/rc.d/cruisecontrolrb start, the process does not start. It seems to me that there are three problems with the script: 1. The script does not have the run_rc_command line; 2. There is a typo on line 28 ("curisecontrol" instead of "cruisecontrol", causing invalid arguments being passed to the start command; 3. 'stop' is not a valid argument for the cruise command, which means that stop command does not stop the daemon, giving an error message instead. >How-To-Repeat: Install the www/ruby-cruisecontrolrb port and try running the supplied rc.d script: /usr/local/etc/rc.d/cruisecontrolrb start >Fix: Replace the port-supplied script with the following: #!/bin/sh # PROVIDE: cruisecontrolrb # REQUIRE: DAEMON # KEYWORD: shutdown # # This script is modified by placing the following variables inside # /etc/rc.conf.local, /etc/rc.conf, or /etc/rc.conf.d/cruisecontrolrb: # # cruisecontrolrb_enable (bool): # Set it to YES to enable this service. # Default: NO # cruisecontrolrb_port (port): # Set it to a port # Default: 3333 . /etc/rc.subr name=cruisecontrolrb rcvar=${name}_enable pidfile="/usr/local/www/cruisecontrolrb/tmp/pids/mongrel.pid" command="/usr/local/www/cruisecontrolrb/cruise" load_rc_config $name : ${cruisecontrolrb_enable="NO"} : ${cruisecontrolrb_port="3333"} command_args="-p ${cruisecontrolrb_port}" start_cmd="cruisecontrolrb_cmd start" stop_cmd="cruisecontrolrb_cmd stop" cruisecontrolrb_cmd() { case $1 in start) command_args="${command_args} -d" ${command} $1 ${command_args} ;; stop) kill `cat $pidfile` ;; esac } run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004021602.o32G2PQ0011010>