Commit fd95f240 by Serge Hallyn

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: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent e9831f83
...@@ -26,7 +26,7 @@ templatedir=@LXCTEMPLATEDIR@ ...@@ -26,7 +26,7 @@ templatedir=@LXCTEMPLATEDIR@
lxcinitdir=@LXCINITDIR@ lxcinitdir=@LXCINITDIR@
get_default_lxcpath() { 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 if [ -n "$LXC_PATH" ]; then
echo $LXC_PATH | awk -F= '{ print $2 }' echo $LXC_PATH | awk -F= '{ print $2 }'
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment