lxc.functions: don't let LXC_PATH= line end in failure

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>
This commit is contained in:
Serge Hallyn 2013-04-09 16:23:05 -05:00
parent e9831f8353
commit fd95f2402d

View 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