← Back to team overview

lubuntu-qa team mailing list archive

Re: (PPC) Latest Radeon Kernel Bug

 

On 09/21/2012 12:03 PM, ∅ wrote:

> if [ $(md5sum $iso_filename | awk '{print $1}') == $(grep powerpc MD5SUMS | awk '{print $1}') ];
> then
> 	echo "iso passes"
> else
> 	echo "iso fails"
> 	exit
> fi 

Isn't checking of an md5sum against a line in an MD5SUMS file exactly
what md5sum -c is intended to be used for?  Why do the awk stuff when
the capability exists in the md5sum client already?

One line

  md5sum -c <(grep ${iso_filename}$ MD5SUMS)

seems far simpler to me than the seven lines quoted above.

Also, why, if the md5sum check fails, does the script continue and burn
a known bad image to the CD??  I think that is a mistake, and that

  md5sum -c <(grep ${iso_filename}$ MD5SUMS) || exit 1

might waste fewer CDs :)

Lastly, is dd really the best tool for burning images to CDs?  Isn't it
more appropriate to use a commad-line tool designed for burning optical
media, such as wodim or growisofs or similar, instead?

Jonathan



Follow ups

References