aboutsummaryrefslogtreecommitdiff
path: root/handlers/dup.helper
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-11-29 10:11:14 +0000
committerintrigeri <intrigeri@boum.org>2005-11-29 10:11:14 +0000
commitb27f7e71b6962bf60ca25405fac9b21557ef9791 (patch)
treee6f9d8d84f4cae1a8b37e00bf0a2b838cb122b60 /handlers/dup.helper
parentfbd3c3d84c89f4d4ec31525d1793e186ab9d1f94 (diff)
downloadbackupninja-b27f7e71b6962bf60ca25405fac9b21557ef9791.tar.gz
backupninja-b27f7e71b6962bf60ca25405fac9b21557ef9791.tar.bz2
r3568@krups: intrigeri | 2005-11-17 22:25:05 +0100
dup.helper: some code cleaning
Diffstat (limited to 'handlers/dup.helper')
-rw-r--r--handlers/dup.helper34
1 files changed, 17 insertions, 17 deletions
diff --git a/handlers/dup.helper b/handlers/dup.helper
index 7eca261..7c71ecc 100644
--- a/handlers/dup.helper
+++ b/handlers/dup.helper
@@ -8,15 +8,15 @@ do_dup_host_includes() {
REPLY=
while [ -z "$REPLY" ]; do
formBegin "$dup_title - host system: includes"
- for ((i=0; i < ${#dup_default_includes[@]} ; i++)); do
- formItem include ${dup_default_includes[$i]}
+ for i in $dup_default_includes; do
+ formItem include "$i"
done
formItem include ""
formItem include ""
formItem include ""
formDisplay
[ $? = 0 ] || return 1
- dup_includes=($REPLY)
+ dup_includes="$REPLY"
done
set +o noglob
}
@@ -31,15 +31,15 @@ do_dup_vserver() {
REPLY=
while [ -z "$REPLY" ]; do
formBegin "$dup_title - vservers: includes"
- for ((i=0; i < ${#dup_default_includes[@]} ; i++)); do
- formItem include ${dup_default_includes[$i]}
+ for i in $dup_default_includes; do
+ formItem include "$i"
done
formItem include ""
formItem include ""
formItem include ""
formDisplay
[ $? = 0 ] || return 1
- dup_vsincludes=($REPLY)
+ dup_vsincludes="$REPLY"
done
set +o noglob
}
@@ -47,15 +47,15 @@ do_dup_vserver() {
do_dup_excludes() {
set -o noglob
formBegin "$dup_title: excludes"
- for ((i=0; i < ${#dup_default_excludes[@]} ; i++)); do
- formItem exclude ${dup_default_excludes[$i]}
+ for i in $dup_default_excludes; do
+ formItem exclude "$i"
done
formItem exclude ""
formItem exclude ""
formItem exclude ""
formDisplay
[ $? = 0 ] || return 1
- dup_excludes=($REPLY)
+ dup_excludes="$REPLY"
set +o noglob
}
@@ -260,8 +260,8 @@ EOF
if [ "$host_or_vservers" == host -o "$host_or_vservers" == both ]; then
set -o noglob
- for ((i=0; i < ${#dup_includes[@]} ; i++)); do
- echo "include = ${dup_includes[$i]}" >> $next_filename
+ for i in $dup_includes; do
+ echo "include = $i" >> $next_filename
done
set +o noglob
fi
@@ -285,8 +285,8 @@ EOF
if [ "$host_or_vservers" == vservers -o "$host_or_vservers" == both ]; then
set -o noglob
echo -e "vsnames = \"$selected_vservers\"\n" >> $next_filename
- for ((i=0; i < ${#dup_vsincludes[@]} ; i++)); do
- echo "vsinclude = ${dup_vsincludes[$i]}" >> $next_filename
+ for i in $dup_vsincludes; do
+ echo "vsinclude = $i" >> $next_filename
done
set +o noglob
fi
@@ -299,8 +299,8 @@ EOF
# (supports globbing with '*')
EOF
set -o noglob
- for ((i=0; i < ${#dup_excludes[@]} ; i++)); do
- echo exclude = ${dup_excludes[$i]} >> $next_filename
+ for i in $dup_excludes; do
+ echo "exclude = $i" >> $next_filename
done
set +o noglob
@@ -423,8 +423,8 @@ dup_wizard() {
# Global variables whose '*' shall not be expanded
set -o noglob
- dup_default_includes=(/var/spool/cron/crontabs /var/backups /etc /root /home /usr/local/*bin /var/lib/dpkg/status*)
- dup_default_excludes=(/home/*/.gnupg)
+ dup_default_includes="/var/spool/cron/crontabs /var/backups /etc /root /home /usr/local/*bin /var/lib/dpkg/status*"
+ dup_default_excludes="/home/*/.gnupg"
set +o noglob
dup_main_menu