diff options
author | Micah Anderson <micah@riseup.net> | 2009-02-19 12:20:44 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-02-19 12:20:44 -0500 |
commit | 27a7859c42394a78c16b24f0d08ca28667bb1efa (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /handlers/makecd.in | |
parent | 386c4275946520bc590428e730a9d515155436a0 (diff) | |
download | backupninja-27a7859c42394a78c16b24f0d08ca28667bb1efa.tar.gz backupninja-27a7859c42394a78c16b24f0d08ca28667bb1efa.tar.bz2 |
creating a debian only branch out of what used to be a subversion repository
Diffstat (limited to 'handlers/makecd.in')
-rw-r--r-- | handlers/makecd.in | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/handlers/makecd.in b/handlers/makecd.in deleted file mode 100644 index 1a95d6d..0000000 --- a/handlers/makecd.in +++ /dev/null @@ -1,88 +0,0 @@ -# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- -# -# burncd handler script for backupninja -# -getconf backupdir /var/backups/makecd -getconf exclude -getconf target -getconf burnertype cd -getconf system no -getconf isoonly yes -getconf imagefile backup.iso -getconf device -getconf nicelevel 0 - -# define needed executables: -MKISOFS="/usr/bin/genisoimage" -GROWISOFS="/usr/bin/growisofs" -CDRECORD="/usr/bin/wodim" -CDRDAO="/usr/bin/cdrdao" -DVDINFO="/usr/bin/dvd+rw-mediainfo" - -# create backup dirs and check existence of progs. - -[ -d $backupdir ] || mkdir -p $backupdir -[ -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" - -if [ "$isoonly" == "no" ]; then - [ -e $device ] || fatal "No Burner device available" -fi - -outputfile="$backupdir/$imagefile" -execstr="nice -n $nicelevel $MKISOFS --quiet -R -o $outputfile " - -str="" -# excludes -for i in $exclude; do - str=" -x ${i}$str" -done - -debug 0 "echo $str " -execstr="${execstr} $str $target " -debug 0 "echo $execstr " - -output=` $execstr 2>&1 ` -code=$? -if [ "$code" == "0" ]; then - debug $output - info "Successfully finished creation of iso" -else - 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 -fi -return 0 - |