[24040] in Source-Commits
Re: /svn/athena r23647 - in trunk/athena/bin/bugme: . debian
daemon@ATHENA.MIT.EDU (Robert Basch)
Sat Mar 28 12:07:09 2009
In-Reply-To: <200903272334.n2RNYbVT008922@drugstore.mit.edu>
Mime-Version: 1.0 (Apple Message framework v753.1)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <5C96D3F3-40A5-4AF0-B986-E87583E8992E@mit.edu>
Cc: source-commits@mit.edu
Content-Transfer-Encoding: 7bit
From: Robert Basch <rbasch@MIT.EDU>
Date: Sat, 28 Mar 2009 12:06:11 -0400
To: Evan Broder <broder@mit.edu>
On Mar 27, 2009, at 7:34 PM, Evan Broder wrote:
> +grep -iq $(hostname --fqdn) /afs/athena/system/config/quick/
> quickstations
> +if [ $? -eq 0 -o $FORCE_QUICKSTATION -eq 1 ] && [ -x /usr/bin/
> bugme ]; then
> + STARTUP="/usr/bin/bugme $STARTUP"
> +fi
The grep is not right here; the search pattern is not anchored, for one
thing, so will match on hostnames that are substrings of quickstation
names, and will include '.'s that match any character (though the
latter is unlikely to cause a problem in practice).
You could use, say, awk to do a case-insensitive exact match.
Bob