From 734d53430588dbc924b841d92bcf43ce32d84350 Mon Sep 17 00:00:00 2001 From: Fred Clausen <43556888+fredclausen@users.noreply.github.com> Date: Mon, 28 Aug 2023 17:40:10 -0600 Subject: [PATCH] s6 (#23) --- rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/type | 1 + rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/up | 2 ++ .../s6-overlay/s6-rc.d/logwatcher/dependencies.d/01-pfclient | 0 rootfs/etc/s6-overlay/s6-rc.d/logwatcher/run | 2 ++ rootfs/etc/s6-overlay/s6-rc.d/logwatcher/type | 1 + .../etc/s6-overlay/s6-rc.d/pfclient/dependencies.d/01-pfclient | 0 rootfs/etc/s6-overlay/s6-rc.d/pfclient/run | 2 ++ rootfs/etc/s6-overlay/s6-rc.d/pfclient/type | 1 + rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-pfclient | 0 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/logwatcher | 0 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/pfclient | 0 rootfs/etc/{cont-init.d => s6-overlay/scripts}/01-pfclient | 2 +- .../logwatcher/run => s6-overlay/scripts/logwatcher} | 2 +- .../{services.d/pfclient/run => s6-overlay/scripts/pfclient} | 2 +- rootfs/scripts/healthcheck.sh | 2 +- 15 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/type create mode 100755 rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/up create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/logwatcher/dependencies.d/01-pfclient create mode 100755 rootfs/etc/s6-overlay/s6-rc.d/logwatcher/run create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/logwatcher/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/pfclient/dependencies.d/01-pfclient create mode 100755 rootfs/etc/s6-overlay/s6-rc.d/pfclient/run create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/pfclient/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-pfclient create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/logwatcher create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/pfclient rename rootfs/etc/{cont-init.d => s6-overlay/scripts}/01-pfclient (97%) rename rootfs/etc/{services.d/logwatcher/run => s6-overlay/scripts/logwatcher} (77%) rename rootfs/etc/{services.d/pfclient/run => s6-overlay/scripts/pfclient} (97%) diff --git a/rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/type b/rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/type @@ -0,0 +1 @@ +oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/up b/rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/up new file mode 100755 index 0000000..70bbc3b --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/01-pfclient/up @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/01-pfclient diff --git a/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/dependencies.d/01-pfclient b/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/dependencies.d/01-pfclient new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/run b/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/run new file mode 100755 index 0000000..8888ae1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/logwatcher diff --git a/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/type b/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/logwatcher/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/pfclient/dependencies.d/01-pfclient b/rootfs/etc/s6-overlay/s6-rc.d/pfclient/dependencies.d/01-pfclient new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/pfclient/run b/rootfs/etc/s6-overlay/s6-rc.d/pfclient/run new file mode 100755 index 0000000..94f16e1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/pfclient/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/pfclient diff --git a/rootfs/etc/s6-overlay/s6-rc.d/pfclient/type b/rootfs/etc/s6-overlay/s6-rc.d/pfclient/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/pfclient/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-pfclient b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-pfclient new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/logwatcher b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/logwatcher new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/pfclient b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/pfclient new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/cont-init.d/01-pfclient b/rootfs/etc/s6-overlay/scripts/01-pfclient similarity index 97% rename from rootfs/etc/cont-init.d/01-pfclient rename to rootfs/etc/s6-overlay/scripts/01-pfclient index 0b22540..b0ce7fb 100755 --- a/rootfs/etc/cont-init.d/01-pfclient +++ b/rootfs/etc/s6-overlay/scripts/01-pfclient @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bash +#!/command/with-contenv bash # shellcheck shell=bash # Check to make sure the correct command line arguments have been set diff --git a/rootfs/etc/services.d/logwatcher/run b/rootfs/etc/s6-overlay/scripts/logwatcher similarity index 77% rename from rootfs/etc/services.d/logwatcher/run rename to rootfs/etc/s6-overlay/scripts/logwatcher index 4c67a40..438a31e 100755 --- a/rootfs/etc/services.d/logwatcher/run +++ b/rootfs/etc/s6-overlay/scripts/logwatcher @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bash +#!/command/with-contenv bash #shellcheck shell=bash sleep 5 diff --git a/rootfs/etc/services.d/pfclient/run b/rootfs/etc/s6-overlay/scripts/pfclient similarity index 97% rename from rootfs/etc/services.d/pfclient/run rename to rootfs/etc/s6-overlay/scripts/pfclient index 5b38864..1727b7f 100755 --- a/rootfs/etc/services.d/pfclient/run +++ b/rootfs/etc/s6-overlay/scripts/pfclient @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bash +#!/command/with-contenv bash #shellcheck shell=bash # Test pfclient can run natively (without qemu) diff --git a/rootfs/scripts/healthcheck.sh b/rootfs/scripts/healthcheck.sh index 12ff088..f8b2b38 100755 --- a/rootfs/scripts/healthcheck.sh +++ b/rootfs/scripts/healthcheck.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bash +#!/command/with-contenv bash # Import healthchecks-framework # shellcheck disable=SC1091