X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fmakecd.in;h=78e5454dee6d0ed178d91654819b36f49e87985f;hp=cdfa6b1a631535d13666cb30624440241eca9a6e;hb=4ecaae94054c4eb919ddbd45904d834383a09558;hpb=579ea902ba24854b3c9acb307cda7e996e8e41a3 diff --git a/handlers/makecd.in b/handlers/makecd.in index cdfa6b1..78e5454 100644 --- a/handlers/makecd.in +++ b/handlers/makecd.in @@ -13,10 +13,9 @@ getconf device getconf nicelevel 0 # define needed executables: -MKISOFS="/usr/bin/mkisofs" +MKISOFS="/usr/bin/genisoimage" GROWISOFS="/usr/bin/growisofs" -#CDRECORD="/usr/bin/cdrecord" -CDRECORD="/usr/bin/cdrecord.mmap" +CDRECORD="/usr/bin/wodim" CDRDAO="/usr/bin/cdrdao" DVDINFO="/usr/bin/dvd+rw-mediainfo" @@ -26,13 +25,13 @@ DVDINFO="/usr/bin/dvd+rw-mediainfo" [ -d $backupdir ] || fatal "Backup directory '$backupdir'" [ -e "$target" ] || fatal "target does not exist " -[ -x "$MKISOFS" ] || debug 3 "echo executable mkisofs not present" -[ -x "$GROWISOFS" ] || debug 3 "echo executable growisofs not present" -[ -x "$CDRECORD" ] || debug 3 "echo executable cdrecord not present" -[ -x "$CDRDAO" ] || debug 3 "echo executable cdrdao not present" +[ -x "$MKISOFS" ] || debug 3 "echo executable $MKISOFS not present" +[ -x "$GROWISOFS" ] || debug 3 "echo executable $GROWISOFS not present" +[ -x "$CDRECORD" ] || debug 3 "echo executable $CDRECORD not present" +[ -x "$CDRDAO" ] || debug 3 "echo executable $CDRDAO not present" if [ "$isoonly" == "no" ]; then - [ -e $device ] || fatal "No Burner device available" + [ -e $device ] || fatal "No Burner device available" fi outputfile="$backupdir/$imagefile" @@ -41,7 +40,7 @@ execstr="nice -n $nicelevel $MKISOFS --quiet -R -o $outputfile " str="" # excludes for i in $exclude; do - str=" -x ${i}$str" + str=" -x ${i}$str" done debug 0 "echo $str " @@ -51,38 +50,39 @@ debug 0 "echo $execstr " output=` $execstr 2>&1 ` code=$? if [ "$code" == "0" ]; then - debug $output - info "Successfully finished creation of iso" + debug $output + info "Successfully finished creation of iso" else - warning $output - warning "Failed to create iso" + warning $output + warning "Failed to create iso" fi if [ "$isoonly" == "no" ]; then - if [ "$burnertype" == "cd" ]; then - # burning iso to CD - $CDRECORD -v gracetime=2 dev=$device speed=8 -dao -data $outputfile - code=$? - if [ "$code" == "0" ]; then - debug $output - info "Successfully burned CD" - else - warning $output - warning "Failed to create CD" - fi - fi - if [ "$burnertype" == "dvd" ]; then - # burning iso dvd - $GROWISOFS -speed=2 -Z $device=$outputfile -use-the-force-luke=notray -use-the-force-luke=tty - code=$? - if [ "$code" == "0" ]; then - debug $output - info "Successfully burned DVD" - else - warning $output - warning "Failed to create DVD" - fi - fi + if [ "$burnertype" == "cd" ]; then + # burning iso to CD + $CDRECORD -v gracetime=2 dev=$device speed=8 -dao -data $outputfile + code=$? + if [ "$code" == "0" ]; then + debug $output + info "Successfully burned CD" + else + warning $output + warning "Failed to create CD" + fi + fi + if [ "$burnertype" == "dvd" ]; then + # burning iso dvd + $GROWISOFS -speed=2 -Z $device=$outputfile -use-the-force-luke=notray -use-the-force-luke=tty + code=$? + if [ "$code" == "0" ]; then + debug $output + info "Successfully burned DVD" + else + warning $output + warning "Failed to create DVD" + fi + fi fi return 0 +