INN commit: trunk/control (docheckgroups.in)
INN Commit
Russ_Allbery at isc.org
Sat Apr 25 14:13:59 UTC 2009
Date: Saturday, April 25, 2009 @ 07:13:59
Author: iulius
Revision: 8430
Fix a bug during checkgroups process: when docheckgroups
returned an empty file, it marked everything as to be removed.
Modified:
trunk/control/docheckgroups.in
------------------+
docheckgroups.in | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Modified: docheckgroups.in
===================================================================
--- docheckgroups.in 2009-04-25 14:08:54 UTC (rev 8429)
+++ docheckgroups.in 2009-04-25 14:13:59 UTC (rev 8430)
@@ -23,9 +23,16 @@
fi
## Copy the message without excluded newsgroups and append local newsgroups.
-cat | ${AWK} '{ if ($1 !~ /'"${2:-^#}"'/) { print $0 } }' >${T}/$$msg
+cat | ${AWK} '{ if ($1 !~ /'"${2:-^#}"'/ && $1) { print $0 } }' >${T}/$$msg
test -f ${LOCALGROUPS} && cat ${LOCALGROUPS} | ${EGREP} -v "^#" >>${T}/$$msg
+## Exit if there is no matching newsgroup (otherwise docheckgroups is eager
+## to delete everything).
+test -s ${T}/$$msg || {
+ rm -f ${T}/$$*
+ exit 0
+}
+
## Get the top-level newsgroup names from the message and turn it into
## a regexp.
PATS=`${SED} <${T}/$$msg \
More information about the inn-committers
mailing list