]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix misleading error message in lxc_create
authorMichael Holzt <lxc@my.fqdn.org>
Fri, 8 Jan 2010 14:19:20 +0000 (15:19 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 8 Jan 2010 14:19:20 +0000 (15:19 +0100)
When the configuration path does not exist, lxc_create misleadingly
tells that it was not set.

Signed-off-by: Michael Holzt <lxc@my.fqdn.org>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-create.in

index 0ebc00d4f45c10a312f4a2992bcf4b5c05efb8a1..ab35ea34087296b6b9a8db6f61d773faa65a5f92 100644 (file)
@@ -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