Discussion:
[rancid] Spurious up/down messages - locale & sort
Daniel Schmidt
2011-11-22 17:45:59 UTC
Permalink
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.
john heasley
2011-11-22 20:59:14 UTC
Permalink
Post by Daniel Schmidt
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.
probably belongs in rancid.conf rather than control_rancid.
Daniel Schmidt
2011-11-22 21:18:27 UTC
Permalink
Yeah, that does sound like a better idea

-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Tuesday, November 22, 2011 1:59 PM
To: Daniel Schmidt
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Spurious up/down messages - locale & sort
Post by Daniel Schmidt
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.
probably belongs in rancid.conf rather than control_rancid.
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.

Loading...