Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Oct 2010 21:35:03 GMT
From:      Toomas Aas <toomas@tarkvarastuudio.ee>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/151840: www/ruby-cruisecontrolrb rc.d script doesn't clean up on stop
Message-ID:  <201010302135.o9ULZ3Rs072572@www.freebsd.org>
Resent-Message-ID: <201010302140.o9ULeB1g000606@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         151840
>Category:       ports
>Synopsis:       www/ruby-cruisecontrolrb rc.d script doesn't clean up on stop
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 30 21:40:11 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Toomas Aas
>Release:        8.1-RELEASE-p1
>Organization:
>Environment:
FreeBSD builder.tarkvarastuudio.ee 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #1: Tue Sep 21 23:49:01 EEST 2010     toomas@builder.tarkvarastuudio.ee:/usr/obj/usr/src/sys/TVS8  amd64
>Description:
The script /usr/local/etc/rc.d/cruisecontrolrb doesn't shut down builder processes when run with the 'stop' argument. Since the PID files of the builders are also left behind, this means that cruisecontrol.rb will not start automatically on server reboot.
>How-To-Repeat:
Configure some projects in cruisecontrol.rb

Start the dashboard and builders:
/usr/local/etc/rc.d/cruisecontrolrb start

Now run:
/usr/local/etc/rc.d/cruisecontrolrb stop

And then again:
/usr/local/etc/rc.d/cruisecontrolrb start

Notice that cruisecontrol.rb was not started.
>Fix:
Attached is a patch to the rc.d script, which terminates the builders and removes their PID files when run with the 'stop' argument.

Patch attached with submission follows:

a30 7
    cd %%PREFIX%%/www/${name}/tmp/pids/builders/
    for builder in `ls` 
    do {
        kill $(cat $builder)
        rm ${builder}
    }
    done 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010302135.o9ULZ3Rs072572>