[lxc-devel] [PATCH] lxc.functions: don't let LXC_PATH= line end in failure
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Apr 9 21:24:02 UTC 2013
Otherwise if called from dash with set -e, dash will exit. This
causes lxc-clone to fail.
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
src/lxc/lxc.functions.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc.functions.in b/src/lxc/lxc.functions.in
index b41f9b8..aa5717d 100644
--- a/src/lxc/lxc.functions.in
+++ b/src/lxc/lxc.functions.in
@@ -26,7 +26,7 @@ templatedir=@LXCTEMPLATEDIR@
lxcinitdir=@LXCINITDIR@
get_default_lxcpath() {
- LXC_PATH=$(grep -v "^#" "$globalconf" 2>/dev/null | grep "[ \t]*lxcpath[ \t]*=")
+ LXC_PATH=$(grep -v "^#" "$globalconf" 2>/dev/null | grep "[ \t]*lxcpath[ \t]*=") || true
if [ -n "$LXC_PATH" ]; then
echo $LXC_PATH | awk -F= '{ print $2 }'
else
--
1.8.1.2
More information about the lxc-devel
mailing list