[Koha-patches] [PATCH] Bug 6540 - Followup - koha-create would die without --configfile

Robin Sheat robin at catalyst.net.nz
Tue Aug 23 05:46:41 CEST 2011


From: Magnus Enger <magnus at enger.priv.no>

koha-create would fail to check that --configfile was set on the
commandline, before either including it if it existed or dying if
it did not. This patch should make sure the existence of a
configfile is only tested if --config is set.

Signed-off-by: Robin Sheat <robin at catalyst.net.nz>

This should apply against 3.4 and master.
---
 debian/scripts/koha-create |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create
index 2f17d5d..018cae5 100755
--- a/debian/scripts/koha-create
+++ b/debian/scripts/koha-create
@@ -112,11 +112,14 @@ while true ; do
 done
 
 # Load the configfile given on the command line
-if [ -e "$configfile" ]
+if [ "$configfile" != "" ]
 then
-    . "$configfile"
-else
-    die "$configfile does not exist.";
+    if [ -e "$configfile" ]
+    then
+        . "$configfile"
+    else
+        die "$configfile does not exist.";
+    fi
 fi
 
 # Make sure options from the command line get the highest precedence
-- 
1.7.4.1



More information about the Koha-patches mailing list