[lxc-devel] [lxc-ci/master] images/voidlinux: Fix shutdown

monstermunchkin on Github lxc-bot at linuxcontainers.org
Wed Jul 29 15:22:30 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 303 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200729/6262fca1/attachment.bin>
-------------- next part --------------
From 5dbe388652519a0ff234a586145c3bdf658aeefb Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Wed, 29 Jul 2020 17:21:10 +0200
Subject: [PATCH] images/voidlinux: Fix shutdown

This ensures that /etc/runit/stopit has the correct permissions in order
for a shutdown to be performed.

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 images/voidlinux.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/images/voidlinux.yaml b/images/voidlinux.yaml
index 00f8894..11bd174 100644
--- a/images/voidlinux.yaml
+++ b/images/voidlinux.yaml
@@ -134,5 +134,9 @@ actions:
         touch /etc/sv/agetty-tty${tty}/down
     done
 
+    # This ensures that the container performs a shutdown when receiving SIGCONT.
+    # Runit will only perform a shutdown if /etc/runit/stopit has mode 100, and /etc/runit/reboot has mode 0.
+    sed -ri 's#install -m000 /dev/null /run/runit/stopit#install -m100 /dev/null /run/runit/stopit#' /etc/runit/1
+
 mappings:
   architecture_map: voidlinux


More information about the lxc-devel mailing list