From: "Johannes Süllner" <johannes.suellner@mailbox.org>
To: devel@spectrum-os.org
Cc: "Johannes Süllner" <johannes.suellner@mailbox.org>
Subject: [PATCH] host: Configure s6-linux-init-shutdownd
Date: Fri, 28 Nov 2025 19:01:56 +0100 [thread overview]
Message-ID: <20251128180238.42470-1-johannes.suellner@mailbox.org> (raw)
Makes shutdown and reboot of the Spectrum host using `s6-linux-init-hpr`
possible.
Before, it would fail with "fatal: unable to talk to shutdownd:
Operation not permitted".
Pretty much just copied from commit 18b19f4dfdb1376d90f70f526052011502b97c40,
where this was added to application VMs, but not to the host.
Signed-off-by: Johannes Süllner <johannes.suellner@mailbox.org>
---
host/rootfs/Makefile | 4 +++-
host/rootfs/file-list.mk | 4 ++++
.../service/s6-linux-init-shutdownd/notification-fd | 1 +
.../service/s6-linux-init-shutdownd/notification-fd.license | 2 ++
.../run-image/service/s6-linux-init-shutdownd/run | 5 +++++
host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown | 5 +++++
.../rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final | 3 +++
7 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd
create mode 100644 host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license
create mode 100755 host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run
create mode 100755 host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown
create mode 100755 host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final
diff --git a/host/rootfs/Makefile b/host/rootfs/Makefile
index d528b12..5e90255 100644
--- a/host/rootfs/Makefile
+++ b/host/rootfs/Makefile
@@ -37,7 +37,9 @@ DIRS = \
run \
sys
-FIFOS = etc/s6-linux-init/run-image/service/s6-svscan-log/fifo
+FIFOS = \
+ etc/s6-linux-init/run-image/service/s6-svscan-log/fifo \
+ etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo
BUILD_FILES = build/etc/s6-rc
diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk
index 7625c54..613a9e7 100644
--- a/host/rootfs/file-list.mk
+++ b/host/rootfs/file-list.mk
@@ -15,6 +15,8 @@ FILES = \
image/etc/s6-linux-init/run-image/service/getty-tty2/run \
image/etc/s6-linux-init/run-image/service/getty-tty3/run \
image/etc/s6-linux-init/run-image/service/getty-tty4/run \
+ image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd \
+ image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run \
image/etc/s6-linux-init/run-image/service/s6-svscan-log/notification-fd \
image/etc/s6-linux-init/run-image/service/s6-svscan-log/run \
image/etc/s6-linux-init/run-image/service/serial-getty-generator/run \
@@ -37,6 +39,8 @@ FILES = \
image/etc/s6-linux-init/run-image/service/vmm/run \
image/etc/s6-linux-init/run-image/service/vmm/template/notification-fd \
image/etc/s6-linux-init/scripts/rc.init \
+ image/etc/s6-linux-init/scripts/rc.shutdown \
+ image/etc/s6-linux-init/scripts/rc.shutdown.final \
image/etc/udev/rules.d/99-spectrum.rules \
image/etc/xdg/weston/autolaunch \
image/etc/xdg/weston/weston.ini \
diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license
new file mode 100644
index 0000000..a941ca4
--- /dev/null
+++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license
@@ -0,0 +1,2 @@
+SPDX-License-Identifier: CC0-1.0
+SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run
new file mode 100755
index 0000000..228fc6a
--- /dev/null
+++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -P
+# SPDX-License-Identifier: EUPL-1.2+
+# SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
+
+s6-linux-init-shutdownd -Bc /etc/s6-linux-init
diff --git a/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown
new file mode 100755
index 0000000..3b09c02
--- /dev/null
+++ b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown
@@ -0,0 +1,5 @@
+#!/bin/execlineb -P
+# SPDX-License-Identifier: EUPL-1.2+
+# SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
+
+s6-rc -Dbav2 change
diff --git a/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final
new file mode 100755
index 0000000..7f48a65
--- /dev/null
+++ b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final
@@ -0,0 +1,3 @@
+#!/bin/execlineb -P
+# SPDX-License-Identifier: EUPL-1.2+
+# SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
--
2.50.1
next reply other threads:[~2025-11-28 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 18:01 Johannes Süllner [this message]
2025-11-28 20:17 ` [PATCH] host: Configure s6-linux-init-shutdownd Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251128180238.42470-1-johannes.suellner@mailbox.org \
--to=johannes.suellner@mailbox.org \
--cc=devel@spectrum-os.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).