[lxc-devel] [lxd/master] scripts/bash: Fix snap handling

stgraber on Github lxc-bot at linuxcontainers.org
Thu Oct 22 23:21:54 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201022/d4b58030/attachment.bin>
-------------- next part --------------
From 156dc7b463a88fdbb952a4e46e11a74dc5a563b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 22 Oct 2020 19:21:36 -0400
Subject: [PATCH] scripts/bash: Fix snap handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 scripts/bash/lxd-client | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/bash/lxd-client b/scripts/bash/lxd-client
index 37769d8ec9..dc84465994 100644
--- a/scripts/bash/lxd-client
+++ b/scripts/bash/lxd-client
@@ -55,6 +55,10 @@ _have lxc && {
       return 0
     fi
 
+    if [ -n "${SNAP_COMMON:-""}" ]; then
+      export LXD_DIR=${LXD_DIR:-"${SNAP_COMMON}/lxd/"}
+    fi
+
     lxc_cmds="alias cluster config console copy delete exec export file \
       help image import info init launch list manpage monitor move network \
       operation pause profile project publish query remote rename \


More information about the lxc-devel mailing list