From 708a73f4edd0ba8c32c8dfd194d5f0e12373b2a2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 24 Nov 2014 07:50:05 +0100 Subject: controller: option checking in dtf-run-remote * controller/bin/dtf-run-remote.in: Check that --setup-playbook and --taskdir do point to existing files. --- controller/bin/dtf-run-remote.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in index f617cdb..873b68f 100644 --- a/controller/bin/dtf-run-remote.in +++ b/controller/bin/dtf-run-remote.in @@ -98,10 +98,18 @@ test -z "$opt_taskdir" \ && error "you must specify '--taskdir DIR'" \ && optparse_error=true +test ! -d "$opt_taskdir" \ + && error "\$opt_taskdir is not a directory '$opt_taskdir'" \ + && optparse_error=true + test -z "$opt_setup_playbook" \ && error "you must specify '--setup-playbook PLAYBOOK'" \ && optparse_error=true +test ! -f "$opt_setup_playbook" \ + && error "bad setup playbook '$opt_setup_playbook'" \ + && optparse_error=true + $optparse_error && exit 1 credsfile="$HOME/.dtf/private/os/$opt_openstack_instance.yml" -- cgit