1849812 Members
2164 Online
104044 Solutions
New Discussion

Checksum

 
John B Goode
Advisor

Checksum

How do I verify the condition of depot files downloaded with chksum? Also what am I looking for?
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Checksum

Actually, you don't need to worry about the downloads because when you "unshar" the file to create the .text (documentation) and the .depot file an implicit sum -r is done and compared to a value within the shar bundle itself.

There are a few exceptions to this (primarily in firmware downloads) but the instructions for checking are included in that case.

All you need to do is download the file. Then sh PHKL_25233. That will "unshar" the file and do a sum -r and compare it to the known "good" value within the file itself. You can actually view the downloaded file itself to see how it's done.
If it ain't broke, I can fix that.
John B Goode
Advisor

Re: Checksum

What is unshar? the depot files I've downloaded and not compressed. At least I dont think so.....filename.depot Is that compressed?
A. Clay Stephenson
Acclaimed Contributor

Re: Checksum

Files that end with .depot are not compressed BUT you must make certain that the transfers from the source to your PC or directly to your UNIX box are all binary trasfers. Typically the problems occur when someone does an ASCII transfer somewhere in the chain. When you down load a patch they are always in a "shar'ed" format and the transfers should be ASCII. The binary .depot files are encoded as printable ASCII characters and tacked onto a script. You then simply "sh mydownloadedfile" to "unshar" it.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Checksum

I suppose that I should add that "shar" is shorthand for "shell archive". It is a technique to bundle, compress, and encode data in a self-extracting shell script.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Checksum

If you look at the beginning of a shar file, you'll comments that look a lot like comments in a shell script. And that's what it is...a self-extracting shell script. To convert the file into it's component (known as unshar'ing), just type:

sh /dirname/sharfilename

If the package was packaged with the shar (there *is* a shar command) options to perform checksums when un-shar'd, this is done automatically. However, the easiest way to check the package is to use the tar tvf command as in:

tar tvf /dirname/filename.depot

This will display the table of contents in the depot file. tar will fail if anything is wrong with the depot file.


Bill Hassell, sysadmin