summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/lxc-0.9.0-don-t-let-LXC_PATH-end-in-failure.patch
blob: fe9f8cc539519c07b053fe4d8138251b52029033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From fd95f2402dc70ad41fa2db8fb101f950196458a9 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge.hallyn@ubuntu.com>
Date: Tue, 9 Apr 2013 16:23:05 -0500
Subject: [PATCH] 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>
---
 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.7.11.7