From 66777d5f99889a8297d1798e9473cd134322c2dd Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 20 Mar 2024 15:11:47 +0000 Subject: [PATCH] Simplify startup and dependencies Move startup scripts to /etc/s6-overlay/startup.d oneshot service named "startup" from underlying image executes all files in /etc/s6-overlay/startup.d in alphabetical order Remove various oneshot scripts from longrun service dependencies Add "startup" oneshot service to longrun service dependencies --- rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/type | 1 - rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/up | 2 -- rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/type | 1 - rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/up | 2 -- rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/type | 1 - rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/up | 2 -- .../s6-rc.d/adsbx-stats/dependencies.d/60-mlathub-prep | 0 .../dependencies.d/startup} | 0 .../mlat-client/dependencies.d/01-print-container-version | 0 .../s6-overlay/s6-rc.d/mlat-client/dependencies.d/50-store-uuid | 0 .../s6-rc.d/mlat-client/dependencies.d/60-mlathub-prep | 0 .../dependencies.d/startup} | 0 .../s6-rc.d/mlathub/dependencies.d/01-print-container-version | 0 .../etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/50-store-uuid | 0 .../s6-overlay/s6-rc.d/mlathub/dependencies.d/60-mlathub-prep | 0 .../50-store-uuid => mlathub/dependencies.d/startup} | 0 .../prometheus-readsb/dependencies.d/01-print-container-version | 0 .../s6-rc.d/prometheus-readsb/dependencies.d/50-store-uuid | 0 .../s6-rc.d/prometheus-readsb/dependencies.d/60-mlathub-prep | 0 .../dependencies.d/startup} | 0 .../s6-rc.d/readsb/dependencies.d/01-print-container-version | 0 .../etc/s6-overlay/s6-rc.d/readsb/dependencies.d/50-store-uuid | 0 .../s6-overlay/s6-rc.d/readsb/dependencies.d/60-mlathub-prep | 0 .../50-store-uuid => readsb/dependencies.d/startup} | 0 .../s6-rc.d/user/contents.d/01-print-container-version | 0 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/50-store-uuid | 0 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/60-mlathub-prep | 0 .../{scripts => startup.d}/01-print-container-version | 0 rootfs/etc/s6-overlay/{scripts => startup.d}/50-store-uuid | 0 rootfs/etc/s6-overlay/{scripts => startup.d}/60-mlathub-prep | 0 30 files changed, 9 deletions(-) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/type delete mode 100755 rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/up delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/type delete mode 100755 rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/up delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/type delete mode 100755 rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/up delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/60-mlathub-prep rename rootfs/etc/s6-overlay/s6-rc.d/{50-store-uuid/dependencies.d/01-print-container-version => adsbx-stats/dependencies.d/startup} (100%) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/01-print-container-version delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/50-store-uuid delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/60-mlathub-prep rename rootfs/etc/s6-overlay/s6-rc.d/{60-mlathub-prep/dependencies.d/01-print-container-version => mlat-client/dependencies.d/startup} (100%) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/01-print-container-version delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/50-store-uuid delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/60-mlathub-prep rename rootfs/etc/s6-overlay/s6-rc.d/{60-mlathub-prep/dependencies.d/50-store-uuid => mlathub/dependencies.d/startup} (100%) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/01-print-container-version delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/50-store-uuid delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/60-mlathub-prep rename rootfs/etc/s6-overlay/s6-rc.d/{adsbx-stats/dependencies.d/01-print-container-version => prometheus-readsb/dependencies.d/startup} (100%) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/01-print-container-version delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/50-store-uuid delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/60-mlathub-prep rename rootfs/etc/s6-overlay/s6-rc.d/{adsbx-stats/dependencies.d/50-store-uuid => readsb/dependencies.d/startup} (100%) delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-print-container-version delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/50-store-uuid delete mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/60-mlathub-prep rename rootfs/etc/s6-overlay/{scripts => startup.d}/01-print-container-version (100%) rename rootfs/etc/s6-overlay/{scripts => startup.d}/50-store-uuid (100%) rename rootfs/etc/s6-overlay/{scripts => startup.d}/60-mlathub-prep (100%) diff --git a/rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/type b/rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/type deleted file mode 100644 index bdd22a1..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/type +++ /dev/null @@ -1 +0,0 @@ -oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/up b/rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/up deleted file mode 100755 index 984224c..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/01-print-container-version/up +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /etc/s6-overlay/scripts/01-print-container-version diff --git a/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/type b/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/type deleted file mode 100644 index bdd22a1..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/type +++ /dev/null @@ -1 +0,0 @@ -oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/up b/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/up deleted file mode 100755 index 2f8e03c..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/up +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /etc/s6-overlay/scripts/50-store-uuid diff --git a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/type b/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/type deleted file mode 100644 index bdd22a1..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/type +++ /dev/null @@ -1 +0,0 @@ -oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/up b/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/up deleted file mode 100755 index fe58c47..0000000 --- a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/up +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /etc/s6-overlay/scripts/60-mlathub-prep diff --git a/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/60-mlathub-prep b/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/60-mlathub-prep deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/startup similarity index 100% rename from rootfs/etc/s6-overlay/s6-rc.d/50-store-uuid/dependencies.d/01-print-container-version rename to rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/startup diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/01-print-container-version deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/50-store-uuid deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/60-mlathub-prep b/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/60-mlathub-prep deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/startup similarity index 100% rename from rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/01-print-container-version rename to rootfs/etc/s6-overlay/s6-rc.d/mlat-client/dependencies.d/startup diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/01-print-container-version deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/50-store-uuid deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/60-mlathub-prep b/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/60-mlathub-prep deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/startup similarity index 100% rename from rootfs/etc/s6-overlay/s6-rc.d/60-mlathub-prep/dependencies.d/50-store-uuid rename to rootfs/etc/s6-overlay/s6-rc.d/mlathub/dependencies.d/startup diff --git a/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/01-print-container-version deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/50-store-uuid deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/60-mlathub-prep b/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/60-mlathub-prep deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/startup similarity index 100% rename from rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/01-print-container-version rename to rootfs/etc/s6-overlay/s6-rc.d/prometheus-readsb/dependencies.d/startup diff --git a/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/01-print-container-version deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/50-store-uuid deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/60-mlathub-prep b/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/60-mlathub-prep deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/startup similarity index 100% rename from rootfs/etc/s6-overlay/s6-rc.d/adsbx-stats/dependencies.d/50-store-uuid rename to rootfs/etc/s6-overlay/s6-rc.d/readsb/dependencies.d/startup diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-print-container-version b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-print-container-version deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/50-store-uuid b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/50-store-uuid deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/60-mlathub-prep b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/60-mlathub-prep deleted file mode 100644 index e69de29..0000000 diff --git a/rootfs/etc/s6-overlay/scripts/01-print-container-version b/rootfs/etc/s6-overlay/startup.d/01-print-container-version similarity index 100% rename from rootfs/etc/s6-overlay/scripts/01-print-container-version rename to rootfs/etc/s6-overlay/startup.d/01-print-container-version diff --git a/rootfs/etc/s6-overlay/scripts/50-store-uuid b/rootfs/etc/s6-overlay/startup.d/50-store-uuid similarity index 100% rename from rootfs/etc/s6-overlay/scripts/50-store-uuid rename to rootfs/etc/s6-overlay/startup.d/50-store-uuid diff --git a/rootfs/etc/s6-overlay/scripts/60-mlathub-prep b/rootfs/etc/s6-overlay/startup.d/60-mlathub-prep similarity index 100% rename from rootfs/etc/s6-overlay/scripts/60-mlathub-prep rename to rootfs/etc/s6-overlay/startup.d/60-mlathub-prep