Date: Sun, 24 Feb 2002 15:49:33 -0800 From: "Crist J. Clark" <cjc@FreeBSD.org> To: Doug Barton <dougb@FreeBSD.org> 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> In-Reply-To: <200202241022.g1OAMEp48447@freefall.freebsd.org>; from dougb@FreeBSD.org on Sun, Feb 24, 2002 at 02:22:14AM -0800 References: <200202241022.g1OAMEp48447@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020224154933.D83869>
