From owner-freebsd-rc@FreeBSD.ORG Wed Oct 13 19:21:41 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A075E106566C for ; Wed, 13 Oct 2010 19:21:41 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 8AE178FC13 for ; Wed, 13 Oct 2010 19:21:41 +0000 (UTC) Received: from [208.206.78.30] (port=57426 helo=dt.vicor.com) by postoffice.vicor.com with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.71) (envelope-from ) id 1P66dR-0005PG-Kb for freebsd-rc@freebsd.org; Wed, 13 Oct 2010 12:05:11 -0700 From: Devin Teske To: freebsd-rc@freebsd.org In-Reply-To: <1286925182.32724.18.camel@localhost.localdomain> References: <1286925182.32724.18.camel@localhost.localdomain> Content-Type: text/plain Organization: Vicor, Inc Date: Wed, 13 Oct 2010 12:05:09 -0700 Message-Id: <1286996709.32724.60.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-41.el4) Content-Transfer-Encoding: 7bit X-Scan-Signature: 0a625a8c8c0e1eebcb06b5f9d81eb4a5 X-Scan-Host: postoffice.vicor.com Subject: Re: sysrc(8) -- a sysctl(8)-like utility for managing rc.conf(5) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 19:21:41 -0000 On Tue, 2010-10-12 at 16:13 -0700, Devin Teske wrote: > Hey all, > > [...] > > Behold... sysrc(8) v2.0 > > #!/bin/sh > [...] Version 2.1 is available here: http://druidbsd.sf.net/ Direct links: http://druidbsd.sf.net/download/sysrc.gz (download gzipped) http://druidbsd.sf.net/download/sysrc.txt (view as text) Here's the changes: [dteske@ipm0 ~/bin]$ diff -pu sysrc.orig sysrc --- sysrc.orig 2010-10-13 07:16:06.000000000 +0000 +++ sysrc 2010-10-13 07:13:33.000000000 +0000 @@ -2,8 +2,8 @@ # -*- tab-width: 4 -*- ;; Emacs # vi: set tabstop=4 :: Vi/ViM # -# Revision: 2.0 -# Last Modified: October 12th, 2010 +# Revision: 2.1 +# Last Modified: October 13th, 2010 ############################################################ COPYRIGHT # # (c)2010. Devin Teske. All Rights Reserved. @@ -30,6 +30,7 @@ # SUCH DAMAGE. # # AUTHOR DATE DESCRIPTION +# dteske 2010.10.13 Allow `-f file' multiple times. # dteske 2010.10.12 Updates per freebsd-hackers thread. # dteske 2010.09.29 Initial version. # @@ -42,6 +43,7 @@ # OPTIONS: # -h Print this message to stderr and exit. # -f file Operate on the specified file(s) instead of rc_conf_files. +# Can be specified multiple times for additional files. # -a Dump a list of non-default configuration variables. # -A Dump a list of all configuration variables (incl. defaults). # -d Print a description of the given variable. @@ -146,6 +148,8 @@ usage() "Print this message to stderr and exit." eprintf "$optfmt" "-f file" \ "Operate on the specified file(s) instead of rc_conf_files." + eprintf "$optfmt" "" \ + "Can be specified multiple times for additional files." eprintf "$optfmt" "-a" \ "Dump a list of non-default configuration variables." eprintf "$optfmt" "-A" \ @@ -553,7 +557,7 @@ $LINE" while getopts hf:aAdevinN flag; do case "$flag" in h) usage;; - f) RC_CONFS="$OPTARG";; + f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG";; a) SHOW_ALL=1;; A) SHOW_ALL=2;; d) DESCRIBE=1;; -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> FUN STUFF <- -----BEGIN GEEK CODE BLOCK----- Version 3.1 GAT/CS d(+) s: a- C++(++++) UB++++$ P++(++++) L++(++++) !E--- W++ N? o? K- w O M+ V- PS+ PE Y+ PGP- t(+) 5? X+(++) R>++ tv(+) b+(++) DI+(++) D(+) G+>++ e>+ h r>++ y+ ------END GEEK CODE BLOCK------ http://www.geekcode.com/ -> END TRANSMISSION <-