From 1577dfcf091b0b99775af906430eaa6412dcfb53 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sat, 22 Jun 2024 07:59:01 +0000 Subject: [PATCH] Use bundle.sysctl by default in core and change update to switch to not-active database --- main/nnd-s6-services/APKBUILD | 2 +- main/nnd-s6-services/manage.sh | 2 +- .../contents.d/{sysctl.kernel-hostname => bundle.sysctl} | 0 .../dependencies.d/mount.proc | 0 .../rc/sysctl.kernel-unprivileged_userns_clone/down | 4 ++++ .../rc/sysctl.kernel-unprivileged_userns_clone/type | 1 + .../rc/sysctl.kernel-unprivileged_userns_clone/up | 8 ++++++++ 7 files changed, 15 insertions(+), 2 deletions(-) rename main/nnd-s6-services/rc/bundle.core/contents.d/{sysctl.kernel-hostname => bundle.sysctl} (100%) create mode 100644 main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/dependencies.d/mount.proc create mode 100644 main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/down create mode 100644 main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/type create mode 100644 main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/up diff --git a/main/nnd-s6-services/APKBUILD b/main/nnd-s6-services/APKBUILD index 52870a9..8b97b0a 100644 --- a/main/nnd-s6-services/APKBUILD +++ b/main/nnd-s6-services/APKBUILD @@ -3,7 +3,7 @@ . ../../APKBUILD.template pkgname=nnd-s6-services -pkgver=2.80 +pkgver=2.81 pkgrel=0 pkgdesc="Base services for s6" depends="s6-rc s6-portable-utils s6-linux-utils" diff --git a/main/nnd-s6-services/manage.sh b/main/nnd-s6-services/manage.sh index fe17975..a157908 100755 --- a/main/nnd-s6-services/manage.sh +++ b/main/nnd-s6-services/manage.sh @@ -74,7 +74,7 @@ swap() { } update() { - if ! s6-rc-update -l "$S6_LIVE_PATH" "$S6_SV_PATH/current.$(DB_FRESH_ACT)"; then + if ! s6-rc-update -l "$S6_LIVE_PATH" "$S6_SV_PATH/current.$(DB_FRESH_NAC)"; then error "Failed to update live state of the database" return "$?" fi diff --git a/main/nnd-s6-services/rc/bundle.core/contents.d/sysctl.kernel-hostname b/main/nnd-s6-services/rc/bundle.core/contents.d/bundle.sysctl similarity index 100% rename from main/nnd-s6-services/rc/bundle.core/contents.d/sysctl.kernel-hostname rename to main/nnd-s6-services/rc/bundle.core/contents.d/bundle.sysctl diff --git a/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/dependencies.d/mount.proc b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/dependencies.d/mount.proc new file mode 100644 index 0000000..e69de29 diff --git a/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/down b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/down new file mode 100644 index 0000000..3e44b46 --- /dev/null +++ b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/down @@ -0,0 +1,4 @@ +#!/bin/execlineb -P +export VAL 0 +export SYSCTL kernel/unprivileged_userns_clone +/usr/libexec/nnd/sysctl diff --git a/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/type b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/type @@ -0,0 +1 @@ +oneshot diff --git a/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/up b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/up new file mode 100644 index 0000000..50ae735 --- /dev/null +++ b/main/nnd-s6-services/rc/sysctl.kernel-unprivileged_userns_clone/up @@ -0,0 +1,8 @@ +#!/bin/execlineb -P +importas -i XDG_CONFIG_HOME XDG_CONFIG_HOME + +export VAL 0 +s6-envdir -I ${XDG_CONFIG_HOME}/s6/env/sysctl.kernel-unprivileged_userns_clone + +export SYSCTL kernel/unprivileged_userns_clone +/usr/libexec/nnd/s6/sysctl