Date: Wed, 13 Oct 2010 12:05:09 -0700 From: Devin Teske <dteske@vicor.com> To: freebsd-rc@freebsd.org Subject: Re: sysrc(8) -- a sysctl(8)-like utility for managing rc.conf(5) Message-ID: <1286996709.32724.60.camel@localhost.localdomain> In-Reply-To: <1286925182.32724.18.camel@localhost.localdomain> References: <1286925182.32724.18.camel@localhost.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1286996709.32724.60.camel>