Resin currently fails to start at boot on rcng systems (such as FreeBSD 6.1) that pass the "faststart" argument to the rc scripts. Resin's rc script simply passes whatever argument it is given on to the resinctl utility, and without the patch below resinctl does not recognize "faststart" as a valid argument. Fix: Apply this patch to ports/www/resin3/files/resinctl. ------------------------------------------------------- --Boundary-00=_wC32EtmRpzYdMOc Content-Type: text/plain; name="ports: www/resin3 does not start with "faststart"" Content-Transfer-Encoding: 7bit--5wioYJN1lMsq55Pl1ldD49IbSeHFD6NQkCwKyYYam635xmBY Content-Type: text/plain; name="resinctl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="resinctl.patch" --- resinctl.orig Thu Aug 10 13:30:39 2006 +++ resinctl Thu Aug 10 13:31:56 2006 @@ -67,7 +67,7 @@ return 0 def usage(): - print >> sys.stderr, "Usage: %s {start|stop|restart}" % sys.argv[0] + print >> sys.stderr, "Usage: %s {start|faststart|stop|restart}" % sys.argv[0] def start(): cwd = os.getcwd() @@ -174,6 +174,9 @@ sys.exit(1) if sys.argv[-1] == "start": + start() + + elif sys.argv[-1] == "faststart": start() elif sys.argv[-1] == "stop": How-To-Repeat: Reboot a FreeBSD 6.1 system with resin installed. Resin fails to start, and (depending on its configuration) Apache may fail as well.
State Changed From-To: open->feedback Awaiting maintainers feedback
I can't find the faststart argument in the rc man page: http://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8 Could you please provide a link to the relevant documentation? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Responsible Changed From-To: freebsd-ports-bugs->hq I'll handle this.
Hello! John is right, Jean-Baptiste. I see this problem too. Please look "man rc.subr" for faststart: argument may have one of the following prefixes which alters its operation: fast Skip the check for an existing running process, and sets rc_fast=YES. force Skip the checks for rcvar being set to ``YES'', and sets rc_force=YES. This ignores argument_precmd returning non-zero, and ignores any of the required_* tests failing, and always returns a zero exit status. one Skip the checks for rcvar being set to ``YES'', but performs all the other prerequisite tests. But I disagree the way Jhon implemented. IMHO resin3 rcNG script should be modified to remove "fast" prefix from argument. With respect, Boris Kovalenko
Thank you Boris, I see now that all possible prefixes should be removed. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
What about the attached patch? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
What about this one? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
* Boris Kovalenko: > Are You sure I should try it? As I see it will not work for "stop" command :) Yes, rc.subr is designed to run the command only for "start" by default. See description for the "stop" argument below, it does not invoke "command": For a given method argument, if argument_cmd is not defined, then a default method is provided by run_rc_command: Argument Default method start If command is not running and checkyesno rcvar suc- ceeds, start command. stop Determine the PIDs of command with check_pidfile or check_process (as appropriate), kill sig_stop those PIDs, and run wait_for_pids on those PIDs. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
Please use the latest patch in this thread marked with date "Tue Aug 22 16:19:58 2006". Thank you. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/
State Changed From-To: feedback->open Feedback received. New patch tested.
State Changed From-To: open->closed Patch commited. Thanks for your contribution!