From owner-cvs-all@FreeBSD.ORG Sun Aug 30 17:24:09 2009 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E675A1065676; Sun, 30 Aug 2009 17:24:08 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id D9E508FC16; Sun, 30 Aug 2009 17:24:07 +0000 (UTC) Received: by bwz2 with SMTP id 2so2256620bwz.43 for ; Sun, 30 Aug 2009 10:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=B/J8womT46XlwHVSieFxtufzhHzbBhQYnW2MJWnXcIs=; b=xyFqes4/efjw7/U5D3o53skx1XGQ1TkY0qb0Wg1Q8QAsHETS6VZVw4ZYrGcUw5vG08 caYRfq0KM9LAHCJzi2T4ot8DbOKgto9wsHC5McwPAatFqcL5GdoF3t+e4U/82A7P+SWB VPlhPkjuLDxUTeFCqcT0BqMlIH9kQFG2zt2gg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=q2VjON1gS8TanNFsmIT2obS9VmgHoqhcF1n5z81RJBXL6YPR9hAz/b30vYAsMlnLNa iXNcLpo/jgGNG/6SYz7yJB8M5+n6J6R4Y74GZl4JgO4EMvX8yIBmmtXog+WQQwpc9Nks OgRzU4d7KiyOrfxdq0qtHkkKofb/ePtVKZeJY= Received: by 10.103.76.5 with SMTP id d5mr1620899mul.131.1251651110436; Sun, 30 Aug 2009 09:51:50 -0700 (PDT) Received: from underworld.novel.ru (pppoe-88-147-235-93.san.ru [88.147.235.93]) by mx.google.com with ESMTPS id y37sm18610975mug.51.2009.08.30.09.51.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Aug 2009 09:51:49 -0700 (PDT) Date: Sun, 30 Aug 2009 20:50:50 +0400 From: Roman Bogorodskiy To: Doug Barton Message-ID: <20090830165047.GA1318@underworld.novel.ru> References: <200908211855.n7LItCIA072991@repoman.freebsd.org> <4A8F1050.3020206@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8F1050.3020206@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, Roman Bogorodskiy , ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/security/scanlogd Makefile ports/security/scanlogd/files scanlogd.in scanlogd.sh X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 17:24:09 -0000 Doug Barton wrote: > Roman Bogorodskiy wrote: > > novel 2009-08-21 18:55:12 UTC > > > > FreeBSD ports repository > > > > Modified files: > > security/scanlogd Makefile > > Added files: > > security/scanlogd/files scanlogd.in > > Removed files: > > security/scanlogd/files scanlogd.sh > > Log: > > Improve USE_RC_SUBR usage. > > > > PR: 136849 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=136849 > > Submitted by: pgollucci > > > > Revision Changes Path > > 1.9 +3 -9 ports/security/scanlogd/Makefile > > 1.1 +25 -0 ports/security/scanlogd/files/scanlogd.in (new) > > 1.5 +0 -25 ports/security/scanlogd/files/scanlogd.sh (dead) > > > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/security/scanlogd/Makefile.diff?&r1=1.8&r2=1.9&f=h > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/security/scanlogd/files/scanlogd.in > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/security/scanlogd/files/scanlogd.sh > > Thanks for committing this improvement. :) Couple of notes on the > rc.d script, none of them life-threatening: > > 1. Unless this tool provides services that are needed for logging in, > "REQUIRE: DAEMON, BEFORE: LOGIN" should be replaced with "REQUIRE:LOGIN" > 2. The default variable assignment should come after load_rc_config, > and should use just - instead of :- > 3. In my last cleanup pass I missed the empty "required_files" > variable. That should be removed (or filled in, as appropriate). > > As always, more info in > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html Hello! So basically it should look like this: Index: scanlogd.in =================================================================== RCS file: /home/pcvs/ports/security/scanlogd/files/scanlogd.in,v retrieving revision 1.1 diff -u -r1.1 scanlogd.in --- scanlogd.in 21 Aug 2009 18:55:12 -0000 1.1 +++ scanlogd.in 30 Aug 2009 16:50:21 -0000 @@ -4,22 +4,21 @@ # $FreeBSD: ports/security/scanlogd/files/scanlogd.in,v 1.1 2009/08/21 18:55:12 novel Exp $ # PROVIDE: scanlogd -# REQUIRE: DAEMON -# BEFORE: LOGIN +# REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable scanlogd: # scanlogd_enable="YES" # scanlogd_flags="" -scanlogd_enable=${scanlogd_enable:-"NO"} # Enable scanlogd - . %%RC_SUBR%% name="scanlogd" rcvar=`set_rcvar` command="%%PREFIX%%/bin/${name}" -required_files="" load_rc_config $name + +: ${scanlogd_enable-"NO"} # Enable scanlogd + run_rc_command "$1" Is it OK? Thanks, Roman Bogorodskiy