r3567@krups: intrigeri | 2005-11-17 22:08:30 +0100
authorintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 29 Nov 2005 10:11:04 +0000 (10:11 +0000)
committerintrigeri <intrigeri@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 29 Nov 2005 10:11:04 +0000 (10:11 +0000)
 pgsql.helper: forbid the user to choose an empty database set to backup

git-svn-id: http://code.autistici.org/svn/backupninja/trunk@251 758a04ac-41e6-0310-8a23-8373a73cc35d

ChangeLog
handlers/pgsql.helper

index b3de985fa85b0775ab21dc538435d05b8d910009..5ca58ecddf8bab44d93d3e21e5769ef402b7d30b 100644 (file)
--- 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
index 1c8b4ef99091738da3d9aeb4a115c861939b4d96..aa807a56a9a3ca4c59b0e5977a8841e028af4cca 100644 (file)
@@ -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
 }