You are not logged in.

#1 2014-07-18 19:44:35

nstgc
Member
Registered: 2014-03-17
Posts: 393

"Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

I know that this is below the level typically seen in this subforum, and if this is is the wrong place I'm sorry. This was my best guess as to where this topic should go.

I'm write a small collecting of scripts that automate the process of archiving my data onto BD-R, which includes burning, and checking. The script in question burns an previously created image, and then checks the image.

After growisofs finishes burning it ejects the disc. I close the drive with "eject -t", however DVDisaster isn't able to find the drive afterwards. At first I added some "wait" and "sleep" commands in hopes that this would fix the issue, but it does not.

I also tried running "eject -t" and then running the script with "eject -t" commented out, and this error does not occur.

The first block of code is the full script, while the second one is the part I feel is relevant.

#!/bin/bash

HASH=ISO-Hashes.sha3512
tDIR=/btrfs/raid0/BURN/Test
bDIR=/btrfs/raid0/BURN
eDIR=/btrfs/raid1/ECC
dLOG=/tmp/dvdisaster.log
hLOG=/tmp/rhash.log
bBDR=/dev/sr0
dBDR=/mnt/bdr
#note that this requires te following fstab entry:
#/dev/sr0 auto noauto,user,ro 0 0
#as well as a place to mount it
#you can just sudo echo "/dev/sr0 auto noauto,user,ro 0 0" >>/etc/fstab


DONE=0


while [ $DONE = 0 ]; do

	CANCEL=0

	if [ "$ISO" = "" ]; then
		
		echo "Which ISO should I use?"
		echo "Please include the extension"
		
		read ISO
		
		ECC=${ISO:0:-4}.ecc
		
		echo ""
	fi

	while [ ! -e $eDIR/$ECC ]; do
		
		echo "$ECC doesn't exist in directy $eDIR"
		echo "Please double check"
		
		for number in {1..5}; do
			sleep 1
			echo ""
		done
		
		read -p "press enter to try again, or exit to stop" EXISTS
		
		read OVERRIDE
		
		if [ "EXISTS" = "exit" ]; then 
			
			exit 1
		
		elif [ "$EXISTS" -ne "" ]; then
			
			echo "You don't follow commands well do you"
			echo "Oh well"
			
		fi

	done
	
	while [ ! -e $bDIR/$ISO ]; do
		
		echo "$ISO doesn't exist in directy $bDIR"
		echo "Please double check"
		
		for number in {1..5}; do
			sleep 1
			echo ""
		done
		
		read -p "press enter to try again, or exit to stop" EXISTS
		
		read OVERRIDE
		
		if [ "EXISTS" = "exit" ]; then 
			
			DONE=1
			exit 1
		
		elif [ "$EXISTS" -ne "" ]; then
			
			echo "You don't follow commands well do you"
			echo "Oh well"
			
		fi

	done

	while [ ! -e $eDIR/$HASH ]; do
		
		echo "$HASH doesn't exist in directy $hDIR"
		echo "Please double check"
		
		for number in {1..5}; do
			sleep 1
			echo ""
		done
		
		read -p "press enter to try again, or exit to stop" EXISTS
		
		read OVERRIDE
		
		if [ "EXISTS" = "exit" ]; then 
			
			exit 1
		
		elif [ "$EXISTS" -ne "" ]; then
			
			echo "You don't follow commands well do you"
			echo "Oh well"
			
		fi

	done








	echo "Do you wish to continue burning $ISO to disk?"
	echo "Y (yes), n (no), b (back)"
	
	read -p "Y/n/b..." Continue

	echo ""
	echo ""

	case $Continue in
		
		""|Y|y|yes)		
			#~ trap CANCEL=1 INT
			#~ echo "Will start burning $ISO in 5 seconds"
			#~ echo "press CTRL+C to cancel"
			#~ echo ""
			#~ for number in {1..5}; do
				#~ if [ "$CANCEL" = "0" ]; then
					#~ echo -n $number
					#~ sleep 1
				#~ fi
			#~ done
			#~ echo ""
			#~ if [ "$CANCEL" = "1" ]; then
				#~ echo "Going back"
				#~ echo ""
			#~ fi
			#~ if [ "$CANCEL" = "0" ]; then
				#~ growisofs -use-the-force-luke=spare:none -dvd-compat -Z /dev/sr0=$bDIR/$ISO
				DONE=1
			#~ fi
			;;
		
		n|no)  
			echo "Cancelling burn"
			echo "So long and thanks for all the fish"
			echo ""
			exit 1
			;;
		
		b|back)
			ISO=""
			;;
		
		*)
			echo "I'm sorry, I don't recognise that input"
			echo "Choices are y, n, and, b"
			echo "Please try again"
			sleep 1
			echo ""
			;;
			
	esac
	
done


wait

echo "Retracting tray"

eject -T

wait

echo "waiting 5 seconds"

sleep 5

wait

dvdisaster --read --device $bBDR  --image $tDIR/$ISO
dvdisaster --test --image $tDIR/$ISO --ecc $eDIR/$ECC 2> $dLOG
echo "rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' $eDIR/$HASH  >> $hLOG" > $hLOG
echo ""
rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' $eDIR/$HASH  >> $hLOG

echo "$cat $dLOG"
cat $dLOG
echo "cat $hLOG"
cat $hLOG
#!/bin/bash

wait

echo "Retracting tray"

eject -T

wait

echo "waiting 5 seconds"

sleep 5

wait

dvdisaster --read --device $bBDR  --image $tDIR/$ISO
dvdisaster --test --image $tDIR/$ISO --ecc $eDIR/$ECC 2> $dLOG
echo "rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' $eDIR/$HASH  >> $hLOG" > $hLOG
echo ""
rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' $eDIR/$HASH  >> $hLOG

[edit] The script itself have "eject -T" in it, however original it was "eject -t". I tried -T inplace of -t just in case.

As for any output errors, aside from the one in the subject I cannot, at this moment, provide any since I'm no longer getting any errors. I'm doing to try burning another disc and seeing if the issue persists, if not, I'll mark this as solved.

[edit2] I forgot to ject the tray before running the script. That's why it didn't fail this time. the output is below

Retracting tray
waiting 5 seconds
dvdisaster-0.72  Copyright 2004-2014 Carsten Gnoerlich.
This software comes with  ABSOLUTELY NO WARRANTY.  This
is free software and you are welcome to redistribute it
under the conditions of the GNU GENERAL PUBLIC LICENSE.
See the file "COPYING" for further information.
# *** OpenAndQueryDevice(/dev/sr0) ***
# *** OpenDevice(/dev/sr0) - GET CONFIGURATION ***
# physical interface standard: 7
# InquireDevice returned: SONY BD RW BWU-500S 1.63
Waiting 10 seconds for drive: 9
Waiting 10 seconds for drive: 8
Waiting 10 seconds for drive: 7
Waiting 10 seconds for drive: 6
Waiting 10 seconds for drive: 5
Waiting 10 seconds for drive: 4
Waiting 10 seconds for drive: 3
Waiting 10 seconds for drive: 2
Waiting 10 seconds for drive: 1
Waiting 10 seconds for drive: 0

*
* dvdisaster - can not continue:
*
Device /dev/sr0 does not become ready:
Not Ready; Logical unit is in process of becoming ready.

[edit3]
I have also tried "dd if=/dev/sr0 of=tDIR/$ISO" in place of dvdisaster --read --device $bBDR  --image $tDIR/$ISO. The error message now is "dd: failed to open ‘/dev/sr0’: No medium found"

Last edited by nstgc (2014-07-18 21:42:13)

Offline

#2 2014-07-18 20:38:08

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

Is the "Device /dev/sr0 does not become ready:" in the post title part of the actual output of the script? If so, the full output would provide more context to help figure out what's happening. In particular, is there some indication of what specific command is failing? If this reliably happens every time you run the script, I would suggest just stepping through the script executing each command individually to see where it's failing. If you know what line is failing, does running that command with a -v flag provide any further information?

Also, you say you're running "eject -t" (retract tray), but your script has "eject -T" (toggle tray between open/closed). As far as I understand, the latter just calls the former to retract the tray, so I'd be surprised if there were a material difference, but you might see if using eject -t in your script makes a difference.

Offline

#3 2014-07-18 20:54:12

nstgc
Member
Registered: 2014-03-17
Posts: 393

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

The script itself have "eject -T" in it, however original it was "eject -t". I tried -T in place of -t just in case.

As for any output errors, aside from the one in the subject I cannot, at this moment, provide any since I'm no longer getting any errors. I'm doing to try burning another disc and seeing if the issue persists, if not, I'll mark this as solved.

I have no idea why its working now since i didn't actually change anything in the script.

[edit] I forgot to eject the tray before running the script. The error is in the code box.

Retracting tray
waiting 5 seconds
dvdisaster-0.72  Copyright 2004-2014 Carsten Gnoerlich.
This software comes with  ABSOLUTELY NO WARRANTY.  This
is free software and you are welcome to redistribute it
under the conditions of the GNU GENERAL PUBLIC LICENSE.
See the file "COPYING" for further information.
# *** OpenAndQueryDevice(/dev/sr0) ***
# *** OpenDevice(/dev/sr0) - GET CONFIGURATION ***
# physical interface standard: 7
# InquireDevice returned: SONY BD RW BWU-500S 1.63
Waiting 10 seconds for drive: 9
Waiting 10 seconds for drive: 8
Waiting 10 seconds for drive: 7
Waiting 10 seconds for drive: 6
Waiting 10 seconds for drive: 5
Waiting 10 seconds for drive: 4
Waiting 10 seconds for drive: 3
Waiting 10 seconds for drive: 2
Waiting 10 seconds for drive: 1
Waiting 10 seconds for drive: 0

*
* dvdisaster - can not continue:
*
Device /dev/sr0 does not become ready:
Not Ready; Logical unit is in process of becoming ready.

[edit2]
I have also tried "dd if=/dev/sr0 of=tDIR/$ISO" in place of dvdisaster --read --device $bBDR  --image $tDIR/$ISO. The error message now is "dd: failed to open ‘/dev/sr0’: No medium found"

Last edited by nstgc (2014-07-18 21:42:35)

Offline

#4 2014-07-21 17:27:33

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

Sorry for the lag in responses. I don't have much experience with optical drives, so I'm probably a bit out of my depth on this one. One obvious thing to check, if you haven't already, is whether the drive is really just taking a really long time to get ready for some reason. If you do the burn, close the tray, and then wait a few minutes, does the read work? If so, then you probably need to just figure out how long it takes and lengthen the pause in your script accordingly, and maybe look into what might cause the drive to be slow to get ready (I have no real idea of what the process there is).

If it doesn't work, maybe check whether the problem is specific to images burned in this way, or to this kind of disk. For example, can you read a commercial BD? If the drive also handles CD/DVD-R, if you burn an image to one of those, can you then read it back with no problem?

Offline

#5 2014-07-22 11:51:57

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

May be I am not getting your issue completely but the simplest approach that springs to my mind for a "wait for drive ready" approach would be grabbing for the output of mount itself for the cd drive.

Something like "mount  | grep /dev/sr0".

If you wait until e.g. /dev/sr0 is listed under the mounted devices, the drive is ready for your verification.


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#6 2014-08-01 19:44:04

nstgc
Member
Registered: 2014-03-17
Posts: 393

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

No need for anyone to apologize for a delay, least of all those who are helping.

I'm not sure that waiting for "mount  | grep /dev/sr0" to display something other than "" will do much, since physically closing the tray then starting a separate script to do the checking works. Using a sleep of 60 instead of 5, which is much longer than it takes me to close the tray with eject -t outside of a script and run the script manually, does work, though its a bit befuddling as to why.

While this thread seems to be solved, I would like to know the following code doesn't cause the script to get stuck in a loop until the drive is ready.

while [ "mount  | grep /dev/sr0" = "" ]; do
	sleep 5
done

The script hits that and then goes right past it. While a few extra seconds doesn't mean too much extra time considering I'm writing 25GB to the disc, then reading it back twice and running 5 different hashes to verify everything is okay, I still would like to have that working as it seems to be a surer way to ensure the script executes corrected.

Also, are there any good tutorials on how to integrate Windows command line programs, using wine, into a Linux bash script? I used the information on WineHQ, but it seems as if the Windows command line syntax is incompatible with BASH's. Currently I'm running ImgBurn separately with Wine in its GUI form.

Offline

#7 2014-08-01 20:26:07

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

I don't have much time to think more about the long time it takes for the drive to become ready, but as for the while loop, you're just comparing the literal string "mount | grep /dev/sr0" to the empty string, which will always return false. To compare the output of the command, you can use backticks:

 while [[ `mount | grep /dev/sr0` == "" ]]
    sleep 5
done

I _think_ you also need double brackets [[ ]] instead of single, though I'm not 100% on that.

Offline

#8 2014-08-03 15:37:27

nstgc
Member
Registered: 2014-03-17
Posts: 393

Re: "Device /dev/sr0 does not become ready:" when "eject -t" used in BASH

eewallace wrote:

I don't have much time to think more about the long time it takes for the drive to become ready, but as for the while loop, you're just comparing the literal string "mount | grep /dev/sr0" to the empty string, which will always return false. To compare the output of the command, you can use backticks:

 while [[ `mount | grep /dev/sr0` == "" ]]
    sleep 5
done

I _think_ you also need double brackets [[ ]] instead of single, though I'm not 100% on that.

That doesn't seem to work. I found a resource on the use of double brackets and such. I'll look over it sometime next week. Thank you though.

23931060224/23978508288 (99.8%) @4.1x, remaining 0:02 RBU 100.0% UBU  59.7%
builtin_dd: 11708256*2KB out @ average 3.9x4390KBps
/dev/sr0: flushing cache
/dev/sr0: closing track
/dev/sr0: closing session
/dev/sr0: reloading tray
Retracting tray
waiting 60 seconds
dvdisaster-0.72  Copyright 2004-2014 Carsten Gnoerlich.
This software comes with  ABSOLUTELY NO WARRANTY.  This
is free software and you are welcome to redistribute it
under the conditions of the GNU GENERAL PUBLIC LICENSE.
See the file "COPYING" for further information.
# *** OpenAndQueryDevice(/dev/sr0) ***
# *** OpenDevice(/dev/sr0) - GET CONFIGURATION ***
# physical interface standard: 7
# InquireDevice returned: SONY BD RW BWU-500S 1.63
Waiting 10 seconds for drive: 9
Waiting 10 seconds for drive: 8
Waiting 10 seconds for drive: 7
Waiting 10 seconds for drive: 6
Waiting 10 seconds for drive: 5
Waiting 10 seconds for drive: 4
Waiting 10 seconds for drive: 3
Waiting 10 seconds for drive: 2
Waiting 10 seconds for drive: 1
Waiting 10 seconds for drive: 0
*
* dvdisaster - can not continue:
*
Device /dev/sr0: no medium present
mount: no medium found on /dev/sr0
cp: cannot stat ‘/mnt/bdr/*’: No such file or directory
umount: /dev/sr0: not mounted
chmod: cannot access ‘/btrfs/raid0/BURN/Test/A037/*’: No such file or directory
RHash: /btrfs/raid0/BURN/Test/A037/A037.sfv: No such file or directory
RHash: /btrfs/raid0/BURN/Test/A037/*: No such file or directory
burn-check-disc2.sh: line 241: cd: /btrfs/raid0/BURN/Test/A037/*/: No such file or directory
RHash: /btrfs/raid0/BURN/Test/A037/*//*.sha512: No such file or directory
 /tmp/dvdisaster.log
dvdisaster-0.72  Copyright 2004-2014 Carsten Gnoerlich.
This software comes with  ABSOLUTELY NO WARRANTY.  This
is free software and you are welcome to redistribute it
under the conditions of the GNU GENERAL PUBLIC LICENSE.
See the file "COPYING" for further information.
/btrfs/raid0/BURN/Test/A037.iso: not present
/btrfs/raid1/ECC/A037.ecc: created by dvdisaster-0.72 (pl6)
- method           : RS01, 64 roots, 33.5% redundancy.
- requires         : dvdisaster-0.55 (good)
- medium sectors   : 11708256
- image md5sum     : 8db8a4fe937886ca162f89d2ee7d1f32
- ecc blocks       : 125542400 (good)
- ecc md5sum       : a0ac3d5410fde0ca3278f5d9a17dcab5 (good)
cat /tmp/rhash.log
rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' /btrfs/raid1/ECC/ISO-Hashes.sha3512  >> /tmp/rhash.log

--( Verifying /btrfs/raid1/ECC/ISO-Hashes.sha3512 )-----------------------------
E019.iso                                            No such file or directory
A034.iso                                            No such file or directory
A035.iso                                            No such file or directory
A036.iso                                            No such file or directory
A037.iso                                            No such file or directory
--------------------------------------------------------------------------------
Errors Occurred: Errors:0   Miss:5   Success:0   Total:5  

_-=---------------------=-_

rhash -c --sha3-256 --sfv /btrfs/raid0/BURN/Test/A037/A037.sfv >> /tmp/rhash.log

_-=---------------------=-_

rhash -k /btrfs/raid0/BURN/Test/A037/* >>/tmp/rhash.log

_-=---------------------=-_

rhash -c --printf='%{sha512} \x2a%p\n' A037//btrfs/raid0/BURN/Test/A037/*//*.sha512 >> /tmp/rhash.log >> /tmp/rhash.log

Below is the entire script in its current form. I'll likely try to work on this further sometime next week.

#!/bin/bash

HASH=ISO-Hashes.sha3512
tDIR=/btrfs/raid0/BURN/Test
bDIR=/btrfs/raid0/BURN/Test
eDIR=/btrfs/raid1/ECC
dLOG=/tmp/dvdisaster.log
hLOG=/tmp/rhash.log
bBDR=/dev/sr0
dBDR=/mnt/bdr
#note that this requires te following fstab entry:
#/dev/sr0 auto noauto,user,ro 0 0
#as well as a place to mount it
#you can just sudo echo "/dev/sr0 auto noauto,user,ro 0 0" >>/etc/fstab
#this is to prevent the need to use sudo, which can has the potential
#to fuck everything up


#at some point you may want to replace those ${ISO:0:4}.ecc and what not
# with ${ISO/iso/ecc}

#see https://stackoverflow.com/questions/2188199/how-to-use-double-or-single-bracket-parentheses-curly-braces


#Should also change some of those if elif elif fi environments to cases


DONE=0


while [ $DONE = 0 ]; do

	CANCEL=0

	if [ "$ISO" = "" ]; then
		
		echo "Which ISO should I use?"
		echo "Please include the extension"
		
		read ISO
		
		ECC=${ISO:0:-4}.ecc
		
		echo ""
	fi

	while [ ! -e $eDIR/$ECC ]; do
		
		echo "$ECC doesn't exist in directy $eDIR"
		echo "Please double check"
		
		for number in {1..5}; do
			sleep 1
			echo ""
		done
		
		read -p "press enter to try again, or exit to stop" EXISTS
		
		read OVERRIDE
		
		if [ "EXISTS" = "exit" ]; then 
			
			exit 1
		
		elif [ "$EXISTS" -ne "" ]; then
			
			echo "You don't follow commands well do you"
			echo "Oh well"
			
		fi

	done
	
	while [ ! -e $bDIR/$ISO ]; do
		
		echo "$ISO doesn't exist in directy $bDIR"
		echo "Please double check"
		
		for number in {1..5}; do
			sleep 1
			echo ""
		done
		
		read -p "press enter to try again, or exit to stop" EXISTS
		
		read OVERRIDE
		
		if [ "EXISTS" = "exit" ]; then  #This likely would work better as a case environment
			
			DONE=1
			exit 1
		
		elif [ "$EXISTS" -ne "" ]; then
			
			echo "You don't follow commands well do you"
			echo "Oh well"
		elif [ "$EXISTS" = "" ]; then
			echo "Retrying"
		fi

	done

	while [ ! -e $eDIR/$HASH ]; do
		
		echo "$HASH doesn't exist in directy $hDIR"
		echo "Please double check"
		
		for number in {1..5}; do
			sleep 1
			echo ""
		done
		
		read -p "press enter to try again, or exit to stop" EXISTS
		
		read OVERRIDE
		
		if [ "EXISTS" = "exit" ]; then 
			
			exit 1
		
		elif [ "$EXISTS" -ne "" ]; then
			
			echo "You don't follow commands well do you"
			echo "Oh well"
			
		fi

	done








	echo "Do you wish to continue burning $ISO to disk?"
	echo "Y (yes), n (no), b (back)"
	
	read -p "Y/n/b..." Continue

	echo ""
	echo ""

	case $Continue in
		
		""|Y|y|yes)		
			trap CANCEL=1 INT
			echo "Will start burning $ISO in 5 seconds"
			echo "press CTRL+C to cancel"
			echo ""
			for number in {1..5}; do
				if [ "$CANCEL" = "0" ]; then
					echo -n $number
					sleep 1
				fi
			done
			echo ""
			if [ "$CANCEL" = "1" ]; then
				echo "Going back"
				echo ""
			fi
			if [ "$CANCEL" = "0" ]; then
				growisofs -use-the-force-luke=spare:none -dvd-compat -Z /dev/sr0=$bDIR/$ISO
				DONE=1
			fi
			;;
		
		n|no)  
			echo "Cancelling burn"
			echo "So long and thanks for all the fish"
			echo ""
			exit 1
			;;
		
		b|back)
			ISO=""
			;;
		
		*)
			echo "I'm sorry, I don't recognise that input"
			echo "Choices are y, n, and, b"
			echo "Please try again"
			sleep 1
			echo ""
			;;
			
	esac
	
done


wait

echo "Retracting tray"

eject -t

wait

echo "waiting 60 seconds"

#~ sleep 60

#~ while [ "mount  | grep /dev/sr0" = "" ]; do
	#~ sleep 5
#~ done

while [[ "mount  | grep /dev/sr0" == "" ]]; do
	echo $COUNT
	sleep 5
	COUNT=$(($COUNT+5))
done

wait

mv $bDIR/$ISO $bDIR/${ISO:0:-4}.1${ISO:4}

dvdisaster --read --device $bBDR  --image $tDIR/$ISO --ecc $eDIR/$ECC
#~ dd if=/dev/sr0 of=$tDIR/$ISO
dvdisaster --test --image $tDIR/$ISO --ecc $eDIR/$ECC 2> $dLOG
echo "rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' $eDIR/$HASH  >> $hLOG" > $hLOG
echo ""
rhash -c --sha3-512 --printf='%{sha3512} \x2a%p\n' $eDIR/$HASH  >> $hLOG

mount $bBDR
mkdir ${ISO:0:-4}
cp -r $dBDR/* $tDIR/${ISO:0:-4}
umount /dev/sr0


cd $tDIR/${ISO:0:-4}
chmod +w $tDIR/${ISO:0:-4}/*

echo "" >> $hLOG
echo "_-=---------------------=-_" >> $hLOG
echo "" >> $hLOG
echo "rhash -c --sha3-256 --sfv $tDIR/${ISO:0:-4}/${ISO:0:-4}.sfv >> $hLOG" >> $hLOG
echo ""
rhash -c --sha3-256 --sfv $tDIR/${ISO:0:-4}/${ISO:0:-4}.sfv >>$hLOG

echo "" >> $hLOG
echo "_-=---------------------=-_" >> $hLOG
echo "" >> $hLOG
echo "rhash -k $tDIR/${ISO:0:-4}/* >>$hLOG" >>$hLOG
echo ""
rhash -k $tDIR/${ISO:0:-4}/* >> $hLOG



for X in $tDIR/${ISO:0:-4}/*/; do
	cd "$X"
	echo "" >> $hLOG
	echo "_-=---------------------=-_" >> $hLOG
	echo "" >> $hLOG
	echo "rhash -c --printf='%{sha512} \x2a%p\n' ${ISO:0:-4}/$X/*.sha512 >> $hLOG >> $hLOG" >> $hLOG
	echo ""
	rhash -c --printf='%{sha512} \x2a%p\n' "$X"/*.sha512 >> $hLOG
done

echo "$cat $dLOG"
cat $dLOG
echo "cat $hLOG"
cat $hLOG

edit] At least on my system, mount | grep /dev/sr0 == "", is always true. I have /dev/sr0 auto noauto,user,ro 0 0 in my fstab and so it never automounts. If the loop is properly constructed then the script should get stuck in that look.

Last edited by nstgc (2014-08-03 22:26:17)

Offline

Board footer

Powered by FluxBB