X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=scripts%2Fburn-imgs.sh;fp=scripts%2Fburn-imgs.sh;h=b4d71bf807219ff3189e41894780f1a971d6a9d7;hb=fc128fd4b1e153273aff366d6ce9f75c2b992c40;hp=2be9e0a664eb26da16a150ff84639c7ce656e5f4;hpb=3a0bcbfd826e75809e778deb36747f645ea58681;p=backups%2F.git diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index 2be9e0a..b4d71bf 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -2,6 +2,7 @@ export PATH=$(dirname $0):/bin:/usr/bin:/sbin +cronstopstart="/etc/init.d/cron" . config.sh # If the noburn file is there then don't burn. @@ -31,6 +32,10 @@ touch $noburnfile [ -z "$img" ] && exit 1 [ -s "$img" ] || exit 1 +# To avoid buffer underruns I'm going to stop cron and renice myself +$cronstopstart stop +renice -10 $$ + # Burn the image to a disk. cdrecord-wrapper.sh -dao dev=$sdev $img > $logfile 2>&1 @@ -39,6 +44,10 @@ if [ "0" != "$?" ]; then exit 1 fi +# We don't need to be high-priority anymore. +renice 0 $$ +$cronstopstart start + # Now verify the disk by running md5sum on the entire contents of the disk md5sum=$(tempfile) echo Md5sum: $md5sum