[lxc-devel] [distrobuilder/master] generators: Fix lxd-agent openRC scripts

monstermunchkin on Github lxc-bot at linuxcontainers.org
Wed Nov 18 20:04:44 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 310 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201118/c8cff664/attachment.bin>
-------------- next part --------------
From 42774609e17dd51dd434846c7c153c1a17459b83 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Wed, 18 Nov 2020 21:02:04 +0100
Subject: [PATCH] generators: Fix lxd-agent openRC scripts

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 generators/lxd-agent.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/generators/lxd-agent.go b/generators/lxd-agent.go
index afa49bc..c5af59e 100644
--- a/generators/lxd-agent.go
+++ b/generators/lxd-agent.go
@@ -218,7 +218,7 @@ required_files=/dev/virtio-ports/org.linuxcontainers.lxd
 start_pre() {
 	/sbin/modprobe 9pnet_virtio || true
 	# Don't proceed if the config drive is mounted already
-	mount | grep -q /run/lxd_config/drive && false
+	mount | grep -q /run/lxd_config/drive && return 1
 	checkpath -d /run/lxd_config -m 0700
 	checkpath -d /run/lxd_config/drive
 }
@@ -243,7 +243,7 @@ start_pre() {
 
 	start_pre() {
 		# Don't proceed if the config drive is mounted already
-		mount | grep -q /run/lxd_config/drive && false
+		mount | grep -q /run/lxd_config/drive && return 1
 		checkpath -d /run/lxd_config -m 0700
 		checkpath -d /run/lxd_config/drive
 	}


More information about the lxc-devel mailing list