#!/bin/bash

DAT="`date +%F_%H%M%S`"
DIR="Test-logs"
LOGF="$DIR/test3d-$DAT.log"


sudo ./hpux_dmsetup create -v 16702a-A.02.90.img
sudo mount -t vxfs -r /dev/mapper/hpuxVG1206652163-lvol3 mnt 
dmesg -c >$LOGF
ls -l mnt > $DIR/test3d-$DAT-ls1.log
echo "****" >>$LOGF
dmesg -c >>$LOGF

ls -l mnt/usr/share/man/man3.Z > $DIR/test3d-$DAT-ls2.log
echo "****" >>$LOGF
dmesg -c >>$LOGF

cksum mnt/usr/share/man/man3.Z/* > $DIR/test3d-$DAT-cksum2.log
cksum mnt/usr/share/doc/10.20RelNotes > $DIR/test3d-$DAT-cksum3.log
cksum mnt/usr/local/doom/* > $DIR/test3d-$DAT-cksum4.log
cksum mnt/usr/sprockets/tools/instrument/16700/* > $DIR/test3d-$DAT-cksum5.log
cksum mnt/usr/share/doc/* > $DIR/test3d-$DAT-cksum6.log
cksum mnt/usr/sprockets/lib/* > $DIR/test3d-$DAT-cksum7.log
cksum mnt/usr/sprockets/bin/* > $DIR/test3d-$DAT-cksum8.log


#sudo bash -c "/sbin/dmsetup remove_all ; /sbin/losetup -d /dev/loop0 ; /sbin/losetup -a"

exit

