[lxc-devel] [PATCH (resubmit, fixed)] fix misleading error message in lxc_create
Michael Holzt
lxc at my.fqdn.org
Fri Jan 8 11:11:56 UTC 2010
When the configuration path does not exist, lxc_create misleadingly
tells that it was not set.
Signed-off-by: Michael Holzt <lxc at my.fqdn.org>
---
src/lxc/lxc-create.in | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in
index 47a9d43..f609da2 100644
--- a/src/lxc/lxc-create.in
+++ b/src/lxc/lxc-create.in
@@ -74,11 +74,16 @@ while true; do
esac
done
-if [ ! -r $lxc_path ]; then
+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 $0
--
1.6.5
More information about the lxc-devel
mailing list