From: "Justin Mason" <[EMAIL PROTECTED]>
Panagiotis Christias writes:
On 8/11/06, DAve <[EMAIL PROTECTED]> wrote:
> DAve wrote:
> > Panagiotis Christias wrote:
> >> On 8/11/06, Theo Van Dinter <[EMAIL PROTECTED]> wrote:
> >>> FWIW, the format sa-update expects is the standard format from sha1sum.
> >>> Does FreeBSD have a sha1sum that produces the format that you showed?
> >>>
> >>> Answering my own question, FreeBSD seems to not have a "sha1sum",
> >>> but has a "sha1" which has that kind of format, which seems to be the
> >>> same output as "openssl sha1 file". Of course to be consistent,
> >>> "openssl ssl < file" produces just the hash.
> >>
> >> FYI, on FreeBSD you can use "sha1 -r file" (-r Reverses the format of
> >> the output).
> >>
> >
> > I have no sha1 command in my bin dirs, locate doesn't find one either.
> > man openssl doesn't show an -r switch as well, and any use of it fails.
> > FreeBSD 4.8, 4.11, 5.2.1, 5.3 using openssl 0.9.7e don't seem to have
> > the sha1 command (all upgraded via ports). The earliest I can find it on
> > my servers is 5.4, using the FreeBSD included openssl.
> >
> > It might show up when I upgrade the port.
> >
>
> Nope, upgraded all the way to 0.9.8b, no sha1 command.
/sbin/sha1 is part of the base system since FreeBSD 5.3. The openssl
command included in the base system supports the sha1 command. Here is
a (dirty?) way to get your output:
openssl sha1 your-file | sed -e 's/^SHA1(//' -e 's/)=//' -e 's/^\(.*\)
\([^ ]*$\)/\2 \1/'
It should be possible to use a perl one-liner with the Digest::SHA1
module, too, which is a SpamAssassin required module anyway ;)
Er RDJ is a simple bash script, I understand.
Add three lines to execute sa-update if it is present right at the end
of the normal RDJ update. Why rewrite the world?
{o.o}