2 #host=media/bs-rescue/bacula-rescue/clients/client1
4 usb=`blkid |grep bs-rescue|cut -d: -f1`
6 if [ -f $owd/$host/diskinfo/uuid.disks.with.no.uuid ];then
7 rm $owd/$host/diskinfo/uuid.disks.with.no.uuid
9 blkid | awk '{ print $1 }'|grep -v loop|grep -v md|grep -v mapper|grep -v $usb|while read line;do
11 l=`echo $line |cut -d"/" -f3`
12 echo "/dev/"$l > $owd/$host/diskinfo/uuid.$l
13 #hdparm -i $line |grep Serial|cut -d, -f3 >>$owd/$host/diskinfo/hdparm.$l
15 a=`blkid $line |wc -w|xargs expr`
17 blkid $line |awk "{print \$$a}"|grep UUID >/dev/null 2>&1
19 blkid $line |awk "{print \$$a}"|grep UUID>>$owd/$host/diskinfo/uuid.$l
23 echo $line >> $owd/$host/diskinfo/uuid.disks.with.no.uuid
31 fdisk -l |grep /dev|grep -v $usb|grep :|cut -d: -f1|cut -d" " -f2|while read line;do
32 l=`echo $line |cut -d"/" -f3`
34 dd if=$line of=$owd/$host/diskinfo/mbr.$l bs=1 count=512 >/dev/null 2>&1