aboutsummaryrefslogtreecommitdiff
path: root/handlers/makecd.helper
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2005-10-28 18:19:41 +0000
committerMicah Anderson <micah@riseup.net>2005-10-28 18:19:41 +0000
commit06b65414ebfe377a9bb63187c0a85b81fefad521 (patch)
treef201f5e32295b3bcf759801c3b9451143e2c32cd /handlers/makecd.helper
parent69c09d916fcd11bfbfbe2b0655f2143d753ad569 (diff)
downloadbackupninja-06b65414ebfe377a9bb63187c0a85b81fefad521.tar.gz
backupninja-06b65414ebfe377a9bb63187c0a85b81fefad521.tar.bz2
added the makecd ninjahelper, and updated the Authors
Diffstat (limited to 'handlers/makecd.helper')
-rw-r--r--handlers/makecd.helper101
1 files changed, 101 insertions, 0 deletions
diff --git a/handlers/makecd.helper b/handlers/makecd.helper
new file mode 100644
index 0000000..822ffd1
--- /dev/null
+++ b/handlers/makecd.helper
@@ -0,0 +1,101 @@
+HELPERS="$HELPERS makecd:makecd_backup"
+wizardname="makecd action wizard"
+
+declare -a makecd_excludes
+
+makecd_wizard() {
+
+ inputBox "$wizardname" "specify a burner type cd or dvd:"
+ [ $? = 1 ] && return
+ burnertype="burnertype = $REPLY"
+
+ #checkBox "makecd action wizard" "check options" \
+ # "isoonly" "only create iso image do not burn" yes
+ #status=$?
+ #[ $status = 1 ] && return;
+ #isoonly="isoonly = $REPLY"
+
+ booleanBox "$wizardname" "Make iso image only? or burn"
+ if [ $? = 0 ]; then
+ isoonly="isoonly = yes"
+ else
+ isoonly="isoonly = no"
+ fi
+
+ # backupdir
+ inputBox "$wizardname" "Directory where to store the backups:"
+ [ $? = 1 ] && return
+ backupdir="backupdir = $REPLY"
+
+ inputBox "$wizardname" "what name to give to the image file?"
+ [ $? = 1 ] && return
+ imagefile="imagefile = $REPLY"
+
+ inputBox "$wizardname" "specify a burner device:"
+ [ $? = 1 ] && return
+ device="device = $REPLY"
+
+ # target - root of system to be included
+ inputBox "$wizardname" "root of filesystem for burn:"
+ [ $? = 1 ] && return
+ target="target = $REPLY"
+
+
+ # excludes
+
+ formBegin "$wizardname: excludes"
+ for ((i=0; i < ${#makecd_excludes[@]} ; i++)); do
+ formItem exclude ${makecd_excludes[$i]}
+ done
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formItem exclude
+ formDisplay
+ [ $? = 1 ] && return;
+
+ unset makecd_excludes
+ makecd_excludes=($REPLY)
+
+ get_next_filename $configdirectory/20.makecd
+ cat >> $next_filename <<EOF
+
+# TYP is cd or dvd AS WELL AS the disk inside!!
+$burnertype
+
+# not yet supported
+system = no
+
+# iso or burn to cd/dvd?
+$isoonly
+
+# location for image file
+$backupdir
+
+# image filename
+$imagefile
+
+# cd/dvd burner device
+$device
+
+# dirs/files to include in the backup
+$target
+
+# directories/files to be excluded
+# exclude = /proc
+# exclude = /sys
+# exclude = /dev
+EOF
+
+ for ((j=0; j < ${#makecd_excludes[@]} ; j++)); do
+ echo "exclude = ${makecd_excludes[$j]}" >> $next_filename
+ done
+
+ chmod 600 $next_filename
+}
+