[lxc-devel] [lxd/master] lxd-agent: Don't rely on systemd for rebooting

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon Nov 23 16:15:54 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201123/4afbfd59/attachment.bin>
-------------- next part --------------
From 57f2d3f8c342636a5ef59502d92475dbffc99158 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 23 Nov 2020 17:15:33 +0100
Subject: [PATCH] lxd-agent: Don't rely on systemd for rebooting

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

diff --git a/lxd-agent/main_agent.go b/lxd-agent/main_agent.go
index 4d826813aa..d3e7585fe9 100644
--- a/lxd-agent/main_agent.go
+++ b/lxd-agent/main_agent.go
@@ -98,7 +98,7 @@ func (c *cmdAgent) Run(cmd *cobra.Command, args []string) error {
 			}
 		}
 
-		shared.RunCommand("systemctl", "reboot")
+		shared.RunCommand("reboot")
 
 		// Wait up to 5min for the reboot to actually happen, if it doesn't, then move on to allowing connections.
 		time.Sleep(300 * time.Second)


More information about the lxc-devel mailing list