[rancid] Spurious up/down messages - locale & sort
Daniel Schmidt
daniel.schmidt at wyo.gov
Tue Nov 22 17:45:59 UTC 2011
I really thought we had this one solved with the tr '[A-Z]' '[a-z]' but, as
it turns out, a dash is < or > digit depending if you locale is POSIX or
en_US.UTF-8. Cron runs as POSIX, so any manual updates have the
possibility of generating spurious up/down diffs. Unable to think of a
good solution, I instead uttered profane words and implemented a quick
solution.
$ diff -U 4 control_rancid.bak control_rancid
--- control_rancid.bak 2011-11-22 10:15:36.000000000 -0700
+++ control_rancid 2011-11-22 10:19:51.000000000 -0700
@@ -42,8 +42,12 @@
#
# control_rancid $GROUP
#
+# #*@& sort locale!!
+LC_COLLATE="POSIX"
+export LC_COLLATE
+
# print a usage message to stderr
pr_usage() {
echo "usage: $0 [-V] [-r device_name] [-m mail rcpt] group" >&2;
}
E-Mail to and from me, in connection with the transaction
of public business,is subject to the Wyoming Public Records
Act, and may be disclosed to third parties.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20111122/69b64f27/attachment.html>
More information about the Rancid-discuss
mailing list