Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 1996 10:31:35 -0700 (MST)
From:      Don Yuniskis <dgy@rtd.com>
To:        tcg@ime.net
Cc:        dgy@rtd.com, fqueries@jraynard.demon.co.uk, questions@freebsd.org
Subject:   Re: perhaps i am just stupid.
Message-ID:  <199608061731.KAA26556@seagull.rtd.com>
In-Reply-To: <3207738D.5881@ime.net> from "Gary Chrysler" at Aug 6, 96 12:32:13 pm

next in thread | previous in thread | raw e-mail | index | archive | help
It seems that Gary Chrysler said:
> 
> Don Yuniskis wrote:
> > 
> > > > Is there a nice "easy" way for folks to verify checksums, etc.
> > > > of their files before installing?  Can this be added to the FAQ
> > >
> > > cat bin.* | gzip -t - is nice and easy, but requires a fully
> > > functioning Unix box...
> > 
> > I was thinking of just 'cksum bin.*' since I would *assume* that
> > the cksums, once correct, would indicate a "good" file...
> > 
> > > Although I believe both these utilities have been ported to DOS.
> > > Perhaps someone with the time and inclination could knock up a
> > > batch file to do this?  gzip.exe is already on the CDROM and I
> > > don't see any reason why cat.exe couldn't be added.
> > 
> > how about:
> >         cksum *.* > fudge
> >         comp fudge goodsums.lst
> > but, of course, that would require the user to have *all* the
> > files listed in "goodsums.lst" online.  Also, you'd have to create
> > an entry for goodsums.lst in the goodsums.lst file itself!  And,
> > since DOS will create fudge before completely expanding the *.*
> > in the cksum command, you need to take it into consideration, also.
> 
> I don't know anything about cksum(1).
> (Welp, I didn't untill after starting this message. This is
>  version 2 :)
> 
> But I just did a cksum(1) on a file.. Why can't that be directed
> to a txt file per directory by the powers that be at FreeBSD

First, I think the emphasis (at least *my* emphasis above) is
to provide a tool to allow folks in DOSland to verify files
have been properly downloaded.  Once FBSD is up and running,
tools for this already exist!

> head quarters, Then someone (me if needed) could whip up a simple
> Dos & Unix based program to read it and verfiy each file.

The 2 line .bat file I proposed above basically does it already.
I guess I would change it to:
	cksum %1.0* > %1.tmp
	comp %1.sum %1.tmp

(I *think* %1 is DOS's version of $1)

Briefly, this cksums all files in a given group (bin.*, sbin.*, etc.)
*except* for the ".sum" file and the ".tmp" file of the same name
(e.g., bin.sum and bin.tmp -- DOS creates bin.tmp to catch the output
of the cksum command.  But, if you said 'cksum %1.* > %1.tmp', DOS
would pass %1.tmp to cksum, too!  :-(   Now, you have %1.tmp holding
the computed checksums for all of the %1.0* files.  Presumably,
%1.sum (e.g., bin.sum) would already contain the checksums for these
files -- because they were computed in the same way from the
*originals* at freebsd.org.  Then, 'comp' (roughly the equivalent
of cmp(1)) just does a compare between the two files.

Yes, there are more elegant ways to do it but this is a no-brainer...

--don



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608061731.KAA26556>