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. 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" How-To-Repeat: Install the www/ruby-cruisecontrolrb port and try running the supplied rc.d script: /usr/local/etc/rc.d/cruisecontrolrb start
Responsible Changed From-To: freebsd-ports-bugs->pgollucci Over to maintainer (via the GNATS Auto Assign Tool)
State Changed From-To: open->closed Committed, with minor changes. Thanks!
pgollucci 2010-04-26 23:14:05 UTC FreeBSD ports repository Modified files: www/ruby-cruisecontrolrb Makefile www/ruby-cruisecontrolrb/files cruisecontrolrb.in Log: - Fix rc.d script PR: ports/145295 Submitted by: Toomas Aas <toomas@tarkvarastuudio.ee> Tweaked by: myself Revision Changes Path 1.7 +1 -1 ports/www/ruby-cruisecontrolrb/Makefile 1.4 +20 -25 ports/www/ruby-cruisecontrolrb/files/cruisecontrolrb.in _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"