- Shell 100%
s6-ports
If you are interested in collaborating on port maintenance, please read the CommitStyle included in CONTRIBUTING
Implementation of S6 init
It is recommended to make the change of init from a chroot. A Venom Linux ISO Live can be used to perform the chroot cage and from there, follow the following instructions:
Add s6 repo in '/etc/starkpm.repo' before main
/usr/ports/s6 https://codeberg.org/lumaro/s6
/usr/ports/main https://codeberg.org/lumaro/main
Sync repos
# portsync -r
Install s6 base
# stark install base-s6
Check pkgs to install
- skalibs
- execline
- s6
- s6-rc
- s6-base
- s6-scripts
- s6-linux-init
- syslogd-s6
- base-s6
Check that s6log user has been created
# grep s6log /etc/passwd
Install needed services
# stark install seatd-s6 dhcpcd-s6 wpa_supplicant-s6 ...
Add needed services to default to run at boot
# s6-service add default foo1 foo2 foo3...
Configure wpa_supplicant service or any other in '/etc/s6/config/foo'
# vim /etc/s6/config/wpa_supplicant.conf
Compile s6 db services
# s6-db-reload -r
Exit chroot
# exit
Reboot system
# reboot
In s6-system up, check enabled services
# s6-rc-db atomics default
Basic usage
-
Stop a service/bundle
# s6-rc -d change service_name# s6-rc stop service_name
-
Start a service/bundle
# s6-rc -u change service_name# s6-rc start service_name
-
Restart a service (only works with s6-rc longruns)
# s6-svc -r /run/service/service_name
-
List all active services
# s6-rc -a list
-
List all services/bundles in the database
# s6-rc-db list all
-
Check the status of an s6-rc longrun
# s6-svstat /run/service/service_name
-
Manage bundles contents with s6-service script:
- Add: s6-service add bundlename contents
# s6-service add default dhcpcd
- Delete: s6-service delete bundlename contents
# s6-service delete default dhcpcd
- Add: s6-service add bundlename contents
Use rc-local service to set static network config or to run anything at boot
- Add your device and ip settings in
/etc/s6/rc.local# Example static ip configuration: ip link set enp3s0 up ip a add 192.168.1.2/24 dev enp3s0 iproute add default via 192.168.1.1 dev enp3s0 - Recompile db
s6-db-reload -r
Clean unwanted services, we use ttys as example
S6 have tty{1,6} enabled by default plus one in reserve ttyS.
We're gonna delete tty{3,6}
-
Remove the services
# rm -r /etc/s6/sv/ttyX
-
Remove getty dependencies
# rm /etc/s6/sv/getty/contents.d/ttyX
-
Recompile ddbb
s6-db-reload -r