]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
standalone: Handle multiple configuration files.
authorIan Campbell <ian.campbell@citrix.com>
Wed, 5 Nov 2014 10:41:24 +0000 (10:41 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 6 Nov 2014 16:20:29 +0000 (16:20 +0000)
OSSTEST_CONFIG can actually be a colon separate list of files, so take this
into account when sanity checking it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
standalone

index c1139f817eadce2c8fa1d9de9b03b8e6960ad841..caf3fd5c87642ee99dee75097929d2e032833b64 100755 (executable)
@@ -112,10 +112,19 @@ if [ ! -f standalone.db ] ; then
     exit 1
 fi
 
-if [ -z "$config" -o ! -r "$config" ] ; then
-    echo "Cannot read config." >&2
+if [ -z "$config" ] ; then
+    echo "No config specified." >&2
     exit 1
 fi
+IFS_saved=$IFS
+IFS=:
+for c in $config ; do
+    if [ -z "$c" -o ! -r "$c" ] ; then
+        echo "Cannot read config $c." >&2
+        exit 1
+    fi
+done
+IFS=$IFS_saved
 
 need_flight() {
     if [ -z "$flight" ] ; then