From owner-cvs-all Sun Feb 24 15:49:43 2002 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id F00AD37B400; Sun, 24 Feb 2002 15:49:33 -0800 (PST) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020224234933.GCAH1147.rwcrmhc52.attbi.com@blossom.cjclark.org>; Sun, 24 Feb 2002 23:49:33 +0000 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.6) id g1ONnXD29464; Sun, 24 Feb 2002 15:49:33 -0800 (PST) (envelope-from cjc) Date: Sun, 24 Feb 2002 15:49:33 -0800 From: "Crist J. Clark" To: Doug Barton Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/mergemaster mergemaster.sh Message-ID: <20020224154933.D83869@blossom.cjclark.org> References: <200202241022.g1OAMEp48447@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202241022.g1OAMEp48447@freefall.freebsd.org>; from dougb@FreeBSD.org on Sun, Feb 24, 2002 at 02:22:14AM -0800 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 24, 2002 at 02:22:14AM -0800, Doug Barton wrote: [snip] > * Add a feature to check variables in rc.conf[.local] to their > counterparts in /etc/defaults/rc.conf after a run It looks like this feature, and the check of make.conf too, are mildly, broken, for RC_CONF_VAR in `grep -i ^[a-z] ${DESTDIR}${CONF_FILE} | cut -d '=' -f 1`; do echo '' grep ^${RC_CONF_VAR} ${DESTDIR}${CONF_FILE} grep ^${RC_CONF_VAR} ${DESTDIR}/etc/defaults/rc.conf || echo ' * No default variable with this name' done If the variable being checked is a substring of _any part_ of a line in etc/defaults/rc.conf. This means we get confusing things like, ifconfig_dc0="inet 192.168.64.50" ifconfig_dc0_alias0="inet 192.168.64.254 netmask 0xffffffff" * No default variable with this name In the output (the second line should not be there). Or mismatches like, rand_irq="1 5 10 11 12" rand_irqs="NO" # Stir the entropy pool (like "5 11" or NO). (This should generate a mismatch error). I think this quick fix should cover these, Index: mergemaster/mergemaster.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v retrieving revision 1.27 diff -u -r1.27 mergemaster.sh --- mergemaster/mergemaster.sh 24 Feb 2002 10:22:14 -0000 1.27 +++ mergemaster/mergemaster.sh 24 Feb 2002 23:45:08 -0000 @@ -956,8 +956,8 @@ for RC_CONF_VAR in `grep -i ^[a-z] ${DESTDIR}${CONF_FILE} | cut -d '=' -f 1`; do echo '' - grep ^${RC_CONF_VAR} ${DESTDIR}${CONF_FILE} - grep ^${RC_CONF_VAR} ${DESTDIR}/etc/defaults/rc.conf || + grep -w ^${RC_CONF_VAR} ${DESTDIR}${CONF_FILE} + grep -w ^${RC_CONF_VAR} ${DESTDIR}/etc/defaults/rc.conf || echo ' * No default variable with this name' done fi @@ -979,8 +979,8 @@ for MAKE_VAR in `grep -i ^[a-z] /etc/make.conf | cut -d '=' -f 1`; do echo '' - grep ^${MAKE_VAR} ${DESTDIR}/etc/make.conf - grep ^#${MAKE_VAR} ${MAKE_CONF} || + grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf + grep -w ^#${MAKE_VAR} ${MAKE_CONF} || echo ' * No example variable with this name' done) | ${PAGER} ;; -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message