]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc.functions: don't let LXC_PATH= line end in failure
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 9 Apr 2013 21:23:05 +0000 (16:23 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 9 Apr 2013 21:23:05 +0000 (16:23 -0500)
Otherwise if called from dash with set -e, dash will exit.  This
causes lxc-clone to fail.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc.functions.in

index b41f9b899ccfce3baea381725542fd751f82d567..aa5717d0becc30e2b033fc97b6838a15d88ca845 100644 (file)
@@ -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