From owner-freebsd-stable@FreeBSD.ORG Mon Mar 2 20:10:40 2009 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 958D010657C9 for ; Mon, 2 Mar 2009 20:10:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 349698FC5A for ; Mon, 2 Mar 2009 20:10:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 22426 invoked by uid 399); 2 Mar 2009 20:10:39 -0000 Received: from localhost (HELO ?192.168.0.24?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Mar 2009 20:10:39 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <49AC3D3C.8040106@FreeBSD.org> Date: Mon, 02 Mar 2009 12:10:36 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Oliver Lehmann References: <20090302163843.cc66c55e.lehmann@ans-netz.de> <20090302202520.eaf09b15.lehmann@ans-netz.de> In-Reply-To: <20090302202520.eaf09b15.lehmann@ans-netz.de> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, stable@freebsd.org, dan@langille.org Subject: Re: restart a script in etc/rc.d X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 20:10:47 -0000 Oliver Lehmann wrote: > Hi Doug, > > Doug Barton wrote: > >> Also, the assignment of pidfile should really come after the defaults are >> set. >> >> If you do all that and it still doesn't work, send a diff of your two rc.d >> scripts to the list. > > PROVIDE is in both cases "utility" (probably a generic unchanged default) > - I've changed it to utility2 for bacula-fd2 with no changes. Here the diff: That's arguably a bug. It should be something more descriptive. The standard is that the name of the script file, the $name variable and the PROVIDE line should all match. > root@nudel rc.d> diff -u bacula-fd* > --- bacula-fd 2009-02-15 23:25:03.000000000 +0100 > +++ bacula-fd2 2009-03-02 20:22:40.000000000 +0100 > @@ -16,16 +16,16 @@ > > . /etc/rc.subr > > -name="bacula_fd" > +name="bacula_fd2" > rcvar=${name}_enable > command=/usr/local/sbin/bacula-fd > > load_rc_config $name > > -pidfile="${bacula_fd_pidfile}" > +pidfile="${bacula_fd2_pidfile}" You missed the bit where I said that this should come after the assignment of the defaults below. > -: ${bacula_fd_enable="NO"} > -: ${bacula_fd_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd.conf"} > -: ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"} > +: ${bacula_fd2_enable="NO"} > +: ${bacula_fd2_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf"} > +: ${bacula_fd2_pidfile="/var/run/bacula-fd.9104.pid"} > > run_rc_command "$1" > Exit 1 > root@nudel rc.d> grep bacula_fd /etc/rc.conf > bacula_fd_enable="YES" > bacula_fd2_enable="YES" > bacula_fd2_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf" > bacula_fd2_pidfile="/var/run/bacula-fd.9104.pid" Have you confirmed that the two pid files exist, and that they contain the right information? Doug -- This .signature sanitized for your protection