From: Michael Holzt Date: Fri, 8 Jan 2010 14:19:20 +0000 (+0100) Subject: fix misleading error message in lxc_create X-Git-Tag: lxc-0.6.5~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9acc339a38b035b8a05fafcba226c4df6bb16850;p=thirdparty%2Flxc.git fix misleading error message in lxc_create When the configuration path does not exist, lxc_create misleadingly tells that it was not set. Signed-off-by: Michael Holzt Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in index 0ebc00d4f..ab35ea340 100644 --- a/src/lxc/lxc-create.in +++ b/src/lxc/lxc-create.in @@ -84,6 +84,16 @@ while true; do esac done +if [ -z "$lxc_path" ]; then + echo "no configuration path defined !" + exit 1 +fi + +if [ ! -r $lxc_path ]; then + echo "configuration path '$lxc_path' not found" + exit 1 +fi + if [ -z "$lxc_name" ]; then echo "no container name specified" usage