From owner-cvs-src@FreeBSD.ORG Tue Nov 22 14:08:56 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DAD116A41F; Tue, 22 Nov 2005 14:08:56 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E81C43D88; Tue, 22 Nov 2005 14:08:42 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jAME8SmJ092123; Tue, 22 Nov 2005 17:08:28 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jAME8SCj092122; Tue, 22 Nov 2005 17:08:28 +0300 (MSK) (envelope-from yar) Date: Tue, 22 Nov 2005 17:08:27 +0300 From: Yar Tikhiy To: Maksim Yevmenkin Message-ID: <20051122140827.GB91654@comp.chem.msu.su> References: <200511152036.jAFKaQMZ089811@repoman.freebsd.org> <20051118101729.GA87399@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/etc/rc.d hcsecd sdpd X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 14:08:56 -0000 On Fri, Nov 18, 2005 at 10:03:04AM -0800, Maksim Yevmenkin wrote: > > > > emax 2005-11-15 20:36:26 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > etc/rc.d hcsecd sdpd > > > Log: > > > Revise hcsecd(8) and sdpd(8) rc.d scripts. > > > > > > - Have both scripts automatically kldload ng_btsocket(4). I did not want to > > > do it, but its easier for users and it seems other scripts do similar things; > > > > You need not override the start method for such a hack. > > Just put the kldload in the prestart method. > > actually, i had to. i have defined sdpd_group and sdpd_user variables, > and, by default, run_rc_command() checks if ${name}_group and > ${name}_user are defined and uses su(1) to start ${command}. > > i guess, i could have used prestart and undefine sdpd_group and > sdpd_user before calling run_rc_command(). I guess different variable names should have been used. Choosing magic names first and fighting their side-effects then doesn't look good to me. > > In addition, you could check if the module is loaded already. > > See the pf* scripts for an example. > > well, yes, i could. but a saw a couple of bad examples in /etc/rc.d :) > that do it without checking. if it really bugs people, i could fix > this. It's almost never too late to fix slips in our computer programs, unlike in some other areas of life ;-) -- Yar