aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-11-29 10:11:04 +0000
committerintrigeri <intrigeri@boum.org>2005-11-29 10:11:04 +0000
commitfbd3c3d84c89f4d4ec31525d1793e186ab9d1f94 (patch)
tree0af84416c6c986117c47f39f1986d1c42fd4aed7
parentd56c0f0aeedc84560821bd3c57239476e12615ca (diff)
downloadbackupninja-fbd3c3d84c89f4d4ec31525d1793e186ab9d1f94.tar.gz
backupninja-fbd3c3d84c89f4d4ec31525d1793e186ab9d1f94.tar.bz2
r3567@krups: intrigeri | 2005-11-17 22:08:30 +0100
pgsql.helper: forbid the user to choose an empty database set to backup
-rw-r--r--ChangeLog5
-rw-r--r--handlers/pgsql.helper36
2 files changed, 23 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index b3de985..5ca58ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,10 @@ version 0.9.2 -- unreleased
moved to lib/ some code that has to be shared between
backupninja and ninjahelper
added duplicity ninjahelper
- a bunch of Vserver-related functions for ninjahelper in lib/vservers.in
+ a bunch of Vserver-related functions for ninjahelper in lib/vservers.in,
+ used only in dup.helper and pgsql.helper yet
+ pgsql ninjahelper bugfixes:
+ forbid the user to choose an empty database set to backup
version 0.9.1 -- November 05 2005
rearranged source so that it is relocatable with autotools
diff --git a/handlers/pgsql.helper b/handlers/pgsql.helper
index 1c8b4ef..aa807a5 100644
--- a/handlers/pgsql.helper
+++ b/handlers/pgsql.helper
@@ -7,23 +7,25 @@ do_pgsql_vserver() {
}
do_pgsql_databases() {
- formBegin "$pgsql_title: databases"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formItem "Database:"
- formDisplay
- [ $? = 1 ] && return
-
- pgsql_databases="databases = "
- for i in $REPLY; do
- [ "$i" != "" ] && pgsql_databases="$pgsql_databases $i"
+ REPLY=
+ while [ -z "$REPLY" ]; do
+ formBegin "$pgsql_title: databases"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formItem "Database:"
+ formDisplay
+ [ $? = 0 ] || return 1
+ pgsql_databases="databases = "
+ for i in $REPLY; do
+ [ -n "$i" ] && pgsql_databases="$pgsql_databases $i"
+ done
done
}