diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-02-10 13:00:48 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-02-10 13:00:48 +0000 |
commit | 89b9fd96d17ed0ed0adc2ffc1345f660bea68f10 (patch) | |
tree | 9fdb5ecf0833c802ce7ad63af224033ffcbec942 /layout/rootfs/etc | |
parent | 934bd389d396748c3184161659af0af82312433a (diff) | |
download | lh-bootstrap-89b9fd96d17ed0ed0adc2ffc1345f660bea68f10.tar.xz |
New utmpd behaviour
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'layout/rootfs/etc')
15 files changed, 19 insertions, 2 deletions
diff --git a/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/init-utmp-early b/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/init-utmp-early new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/init-utmp-early diff --git a/layout/rootfs/etc/s6-rc/source-base/btmpd/run b/layout/rootfs/etc/s6-rc/source-base/btmpd/run index 4c7ffe6..97ab9d3 100755 --- a/layout/rootfs/etc/s6-rc/source-base/btmpd/run +++ b/layout/rootfs/etc/s6-rc/source-base/btmpd/run @@ -1,4 +1,4 @@ -#!/package/admin/execline/command/execlineb -S1 +#!/command/execlineb -S1 fdmove -c 2 1 s6-setuidgid utmp diff --git a/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/dependencies.d/00 b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/dependencies.d/00 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/dependencies.d/00 diff --git a/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/down b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/down new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/down @@ -0,0 +1 @@ + diff --git a/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/type b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/type @@ -0,0 +1 @@ +oneshot diff --git a/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/up b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/up new file mode 100644 index 0000000..cb91c16 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/init-utmp-early/up @@ -0,0 +1,5 @@ +if { s6-mkdir -p -m 0755 /run/utmps } +if { s6-envuidgid utmp s6-chown -U -- /run/utmps } +s6-setuidgid utmp +redirfd -w 1 /run/utmps/utmp +exit 0 diff --git a/layout/rootfs/etc/s6-rc/source-base/init-utmp/dependencies.d/utmpd b/layout/rootfs/etc/s6-rc/source-base/init-utmp/dependencies.d/utmpd new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/init-utmp/dependencies.d/utmpd diff --git a/layout/rootfs/etc/s6-rc/source-base/ok-local/contents.d/utmpd b/layout/rootfs/etc/s6-rc/source-base/ok-local/contents.d/utmpd new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/ok-local/contents.d/utmpd diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/init-utmp-early b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/init-utmp-early new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/init-utmp-early diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/notification-fd b/layout/rootfs/etc/s6-rc/source-base/utmpd/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/utmpd/notification-fd @@ -0,0 +1 @@ +3 diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/run b/layout/rootfs/etc/s6-rc/source-base/utmpd/run new file mode 100755 index 0000000..5c2d5d6 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/utmpd/run @@ -0,0 +1,8 @@ +#!/command/execlineb -S1 + +fdmove -c 2 1 +s6-setuidgid utmp +cd /run/utmps +fdmove 1 3 +s6-ipcserver -1 -c 1000 -- .utmpd-socket +utmps-utmpd diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/type b/layout/rootfs/etc/s6-rc/source-base/utmpd/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/utmpd/type @@ -0,0 +1 @@ +longrun diff --git a/layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/init-utmp-early b/layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/init-utmp-early new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/init-utmp-early diff --git a/layout/rootfs/etc/s6-rc/source-base/wtmpd/run b/layout/rootfs/etc/s6-rc/source-base/wtmpd/run index a49e0de..eb66ed3 100755 --- a/layout/rootfs/etc/s6-rc/source-base/wtmpd/run +++ b/layout/rootfs/etc/s6-rc/source-base/wtmpd/run @@ -4,4 +4,4 @@ s6-setuidgid utmp cd /var/log/wtmpd fdmove 1 3 s6-ipcserver -1 -c 1000 -- /run/utmps/.wtmpd-socket -utmps-wtmpd +utmps-wtmpd wtmp |