Skip to contentSkip to conversation

standalone: force an explicit default config

PATCH In review Ian Campbell 2 participants 2 messages Apr 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 standalone: force an explicit default config

Some scripts (e.g. cri-args-hostlists) default to production-config instead of the more expected ~/.xen-osstest/config. I keep forgetting this, so set the more appropriate default in the helper script.

---
 standalone | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
standalone +6 -1
index 9f57cad..929fb4f 100755
@@ -59,7 +59,7 @@ TEMP=$(getopt -o c:f:h:rR --long config:,flight:,host:,reuse,noreuse,reinstall,h
 
 eval set -- "$TEMP"
 
-config=
+config=$HOME/.xen-osstest/config
 flight="standalone"
 host=
 reuse=1 # Don't blow away machines by default
@@ -98,6 +98,11 @@ if [ ! -f standalone.db ] ; then
     exit 1
 fi
 
+if [ -z "$config" -o ! -r "$config" ] ; then
+    echo "Cannot read config." >&2
+    exit 1
+fi
+
 need_flight() {
     if [ -z "$flight" ] ; then
 	echo "run-job: Need a flight" >&2
Signature · 1 line
1.9.0
Acked-by on v1 1/1
#1 lore raw

Ian Campbell writes ("[PATCH osstest.git] standalone: force an explicit default config"):

Quoted 3 lines

Some scripts (e.g. cri-args-hostlists) default to production-config instead of the more expected ~/.xen-osstest/config. I keep forgetting this, so set the more appropriate default in the helper script.