commit e44d45de2bd2c764be31e3b085874c1da16947a2
parent a23990aabc2119355cf30a7e6ccc7cfba88e2b0c
Author: Jan Pobříslo <ccx@te2000.cz>
Date: Fri, 7 Oct 2022 14:31:30 +0200
Add tinc.ccx service
Diffstat:
M | s6-rc.aat | | | 17 | +++++++++++++++++ |
M | s6-rc.fileset | | | 156 | ++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------- |
2 files changed, 119 insertions(+), 54 deletions(-)
diff --git a/s6-rc.aat b/s6-rc.aat
@@ -503,6 +503,23 @@ CN #!/command/execlineb -P
syncthing -logflags 0
m750
+|add_to_bundle("ok-all-but-tty", "tinc.ccx")
+|longrun_with_logger("tinc.ccx", "net-all")
+/tinc.ccx/run
+CN #!/command/execlineb -P
+ getpid SERVICE_PID
+ foreground {
+ importas -i SERVICE_PID SERVICE_PID
+ if { test -d /run/cgroup2 }
+ if { mkdir -p /run/cgroup2/s6-rc/tinc.ccx }
+ redirfd -w 1 /run/cgroup2/s6-rc/tinc.ccx/cgroup.procs
+ printf "%s" ${SERVICE_PID}
+ }
+ unexport SERVICE_PID
+
+ tincd -n ccx -D -d
+m750
+
|add_to_bundle("net-all", "wpa_supplicant")
|longrun_with_logger("wpa_supplicant", "modules\nok-sysinit")
/wpa_supplicant/run
diff --git a/s6-rc.fileset b/s6-rc.fileset
@@ -199,6 +199,18 @@ CN # mount /dev/mapper/vg-containers_user on /mnt/volumes/containers/user
if { mkdir -p "/mnt/volumes/containers/user" }
if -n -t { mount -t "xfs" -o "remount,nosuid,noatime" "/dev/mapper/vg-containers_user" "/mnt/volumes/containers/user" }
mount -t "xfs" -o "nosuid,noatime" "/dev/mapper/vg-containers_user" "/mnt/volumes/containers/user"
+/mount-sysinit d m755
+/mount-sysinit/contents
+CN mount-sys
+ mount-proc
+ mount-dev
+ mount-dev-pts
+ mount-dev-shm
+ mount-dev-mqueue
+ mount-run-cgroup2
+
+m644
+/mount-sysinit/type cN bundle m644
/ok-localmount d m755
/ok-localmount/contents
CN rootfs
@@ -215,18 +227,6 @@ CN rootfs
m644
/ok-localmount/type cN bundle m644
-/mount-sysinit d m755
-/mount-sysinit/contents
-CN mount-sys
- mount-proc
- mount-dev
- mount-dev-pts
- mount-dev-shm
- mount-dev-mqueue
- mount-run-cgroup2
-
-m644
-/mount-sysinit/type cN bundle m644
/ d m755
/ok-all d m755
@@ -270,7 +270,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
dhcpcd --nobackground
m755
@@ -292,7 +292,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
unbound -d
m755
@@ -321,7 +321,7 @@ CN #!/command/execlineb -P
}
unexport SERVICE_PID
foreground { /command/issue-gen }
-
+
env LOGIN_TTY=/dev/tty1 /sbin/getty -l login-keepenv 38400 tty1 linux
m755
/tty1/finish
@@ -346,7 +346,7 @@ CN #!/command/execlineb -P
}
unexport SERVICE_PID
foreground { /command/issue-gen }
-
+
env LOGIN_TTY=/dev/tty2 /sbin/getty -l login-keepenv 38400 tty2 linux
m755
/tty2/finish
@@ -371,7 +371,7 @@ CN #!/command/execlineb -P
}
unexport SERVICE_PID
foreground { /command/issue-gen }
-
+
env LOGIN_TTY=/dev/tty3 /sbin/getty -l login-keepenv 38400 tty3 linux
m755
/tty3/finish
@@ -396,7 +396,7 @@ CN #!/command/execlineb -P
}
unexport SERVICE_PID
foreground { /command/issue-gen }
-
+
env LOGIN_TTY=/dev/tty4 /sbin/getty -l login-keepenv 38400 tty4 linux
m755
/tty4/finish
@@ -456,6 +456,10 @@ CN foreground { modprobe af_packet }
foreground { modprobe overlay }
foreground { modprobe kvm-intel }
foreground { modprobe tun }
+ foreground { modprobe cpufreq_conservative }
+ foreground { modprobe cpufreq_ondemand }
+ foreground { modprobe cpufreq_powersave }
+ foreground { modprobe cpufreq_userspace }
m755
/mdevd-coldplug d m755
@@ -511,7 +515,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
background {
sh -xc "until /sbin/udevadm settle --timeout=120; do sleep 0.5; done; echo >&3 settled"
#foreground { loopwhilex -x 0 if -nt { /sbin/udevadm settle --timeout=120 } foreground { sleep 0.1 } exit 1 }
@@ -584,7 +588,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
/usr/sbin/sshd -D -f /etc/ssh/sshd_config
m755
@@ -645,7 +649,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
alsactl rdaemon
m750
/alsactl-rdaemon/type cN longrun m640
@@ -687,7 +691,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
if { mkdir -p /run/user/ccx.logs }
if { chown ccx: /run/user/ccx.logs }
if { chmod 700 /run/user/ccx.logs }
@@ -715,7 +719,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
if { mkdir -p /run/user/ccx }
if { chown ccx: /run/user/ccx }
if { chmod 700 /run/user/ccx }
@@ -742,7 +746,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
if { mkdir -p /var/log/syncthing }
s6-log -b -- n10 s10240000 t /var/log/syncthing
m750
@@ -763,12 +767,55 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
/usr/bin/env HOME=/var/lib/syncthing
s6-setuidgid syncthing
syncthing -logflags 0
m750
+/tinc.ccx-log d m755
+/tinc.ccx-log/type cN longrun m644
+/tinc.ccx-log/dependencies
+C mount-run-cgroup2
+ rootfs
+m644
+/tinc.ccx-log/consumer-for cN tinc.ccx m640
+/tinc.ccx-log/run
+CN #!/command/execlineb -P
+ getpid SERVICE_PID
+ foreground {
+ importas -i SERVICE_PID SERVICE_PID
+ if { test -d /run/cgroup2 }
+ if { mkdir -p /run/cgroup2/s6-rc/tinc.ccx-log }
+ redirfd -w 1 /run/cgroup2/s6-rc/tinc.ccx-log/cgroup.procs
+ printf "%s" ${SERVICE_PID}
+ }
+ unexport SERVICE_PID
+
+ if { mkdir -p /var/log/tinc.ccx }
+ s6-log -b -- n10 s10240000 t /var/log/tinc.ccx
+m750
+/tinc.ccx d m755
+/tinc.ccx/type cN longrun m644
+/tinc.ccx/dependencies
+C net-all
+m644
+/tinc.ccx/producer-for cN tinc.ccx-log m640
+/tinc.ccx/run
+CN #!/command/execlineb -P
+ getpid SERVICE_PID
+ foreground {
+ importas -i SERVICE_PID SERVICE_PID
+ if { test -d /run/cgroup2 }
+ if { mkdir -p /run/cgroup2/s6-rc/tinc.ccx }
+ redirfd -w 1 /run/cgroup2/s6-rc/tinc.ccx/cgroup.procs
+ printf "%s" ${SERVICE_PID}
+ }
+ unexport SERVICE_PID
+
+ tincd -n ccx -D -d
+m750
+
/wpa_supplicant-log d m755
/wpa_supplicant-log/type cN longrun m644
/wpa_supplicant-log/dependencies
@@ -787,7 +834,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
if { mkdir -p /var/log/wpa_supplicant }
s6-log -b -- n10 s10240000 t /var/log/wpa_supplicant
m750
@@ -809,7 +856,7 @@ CN #!/command/execlineb -P
printf "%s" ${SERVICE_PID}
}
unexport SERVICE_PID
-
+
/sbin/wpa_supplicant
-iwlan0
-c/etc/wpa_supplicant/wpa_supplicant.conf
@@ -912,7 +959,7 @@ CN #!/command/execlineb -P
-retro
-novtswitch
vt${vtN} :${vtN}
-
+
m755
/kbd_mode d m755
@@ -925,25 +972,6 @@ C kbd_mode-tty1
m644
-/ok-mount d m755
-/ok-mount/type cN bundle m644
-/ok-mount/contents
-C ok-sysinit
- ok-localmount
- mount-tmp-X11
-
-m644
-
-/setfont d m755
-/setfont/type cN bundle m644
-/setfont/contents
-C setfont-tty1
- setfont-tty2
- setfont-tty3
- setfont-tty4
-
-m644
-
/ok-all-but-tty d m755
/ok-all-but-tty/type cN bundle m644
/ok-all-but-tty/contents
@@ -961,6 +989,7 @@ C net-all
containers
svscan-ccx
syncthing
+ tinc.ccx
m644
@@ -973,13 +1002,13 @@ C mount-sysinit
m644
-/gettys d m755
-/gettys/type cN bundle m644
-/gettys/contents
-C tty1
- tty2
- tty3
- tty4
+/setfont d m755
+/setfont/type cN bundle m644
+/setfont/contents
+C setfont-tty1
+ setfont-tty2
+ setfont-tty3
+ setfont-tty4
m644
@@ -993,3 +1022,22 @@ C loopback
m644
+/ok-mount d m755
+/ok-mount/type cN bundle m644
+/ok-mount/contents
+C ok-sysinit
+ ok-localmount
+ mount-tmp-X11
+
+m644
+
+/gettys d m755
+/gettys/type cN bundle m644
+/gettys/contents
+C tty1
+ tty2
+ tty3
+ tty4
+
+m644
+