S6 init system with s6-66 service manager in Antix-init-diversity spin

The goal of this topic is to try out the s6-66 Service Manager.
I chose to do this in Antix. I used
antiX-23.1_amd64_init-diversity-edition_UNOFFICIAL_20240302.iso
installed in a VM under virt-manager.
Antix may not be familiar to some users - it is a Debian based distro and is one of the foundations of the popular MX distro.
Antix , by default comes with a selection of window managers ( you can add a DE). I am happy with IceWM so I am leaving it at that.
Here is what Antix looks like booted with s6-66 and with IceWM

The terminal shows the s6-svscan init process and the s6-supervise processes. The init and supervision part of S6 is the same for s6-rc and s6-66; only the service manager differs.

I started by asking a few questions… here is the essence of it, transferred from another topic

Q: 
Is 66 a complete alternative to s6-rc or is it built on top of it
A:
It used to be a wrapper for s6-rc, but the new version (0.7.0.0) is a full re-write totally independent.

If you have Obarun it still uses the old wrapper version of 66 (until the new Obarun release is out), my antiX/MX/Devuan respins feature the brand new independent version.

The latest release of 66 is 0.7.0.0 and is found here

For those unfamiliar, Obaron is a Linux distro which features s6 as its default init system.

@ProwlerGr also volunteered the folowing
https://web.obarun.org/software/66/latest/66-rosetta.html
The command used do everything in s6-66 is 66… that is right, a
number is a valid command in Linux!
Previous versions of 66 had commands like 66-start ..., but the latest version has changed to 66 start .... So start is a subcommand.

The full manpage for the 66 command is here
https://web.obarun.org/software/66/latest/66.html
and the only other available documentation is the Oberun Wiki
http://wiki.obarun.org/doku.php?id=66.2
which seems to be inaccessible at the moment.

You may gather that in s6-66 we are dealing with a very new product that is still evolving.

Lets have a look and see what is in the s6-66 filesystems

$ ls /etc/66
conf         rc.init            rc.shutdown        seed
environment  rc.init.container  rc.shutdown.final  service
init.conf    rc.local           s6-66-init

nevj@antix-init-diversity:/etc/66
$ ls conf
bluetoothd  boot@system
nevj@antix-init-diversity:/etc/66
$ ls environment
path
nevj@antix-init-diversity:/etc/66
$ ls service
bluetoothd   dbus     NetworkManager  slimski  ubus  wpa-supplicant
boot@system  dhcpcd   nmbd            smbd     ufw   xrdp
connmand     elogind  seatd           sshd     user  xrdp-sesman

So there is a directory called 66 in /etc , and it contains various directories and files, including a dir called service. The files in the service subdir seem to be scripts, eg

$ cat dbus
[main]
@type=classic
@description="dbus daemon"
@version=0.0.1
@user=(root)
@notify=3
[start]
@execute=(
    execl-toc -d /run/dbus -m0755 -g 81 -o 81
    foreground { dbus-uuidgen --ensure }
    /usr/bin/dbus-daemon --system --nofork --nopidfile --print-pid=3
)

That seems to be some sort of run script for the dbus daemon.
I found this

By default, 66 use execline as scripting language. However, you can specify the scripting language to use. 66-tools provide some additonal tools to help you on this task. Some are specific to execline where other can be used on classic shell.

So that is an execline script ( like in s6-rc) but one can use other types of script.

You will notice a directory called boot@system. It contains the following

nevj@antix-init-diversity:/etc/66/service
$ ls boot@system
activated  configure  frontend
nevj@antix-init-diversity:/etc/66/service
$ cd boot@system
nevj@antix-init-diversity:/etc/66/service/boot@system
$ ls activated
depends            mount-pts     populate-sys     system-sysctl
local-authfiles    mount-run     populate-tmp     tty-earlier@tty12
local-dmesg        mount-shm     requiredby       tty-rc@tty1
local-loop         mount-swap    system-fontnkey  tty-rc@tty2
local-sethostname  mount-tmp     system-hostname  udevd
local-time         populate-dev  system-hwclock
mount-cgroups      populate-run  system-random

boot@system is the default bundle… only it is not called a bundle in s6-66 it is called a tree.
I have no idea how a tree differs from a bundle, but they both tie multiple daemons into a group that can be managed with one command.
You can see the contents of boot@system are basic system daemons needed at startup.

Now might be a good time to echo the warning

Do not edit any of the `66` files.  Always use the `66` commands

So it is OK to look, like we have been doing, but dont change any files by hand.

There are other 66 related files in /usr/lib/s6-66, /usr/share/66 and in /var/run/66.

Now let us try and use the 66 command

# 66 status seatd
Name                  : seatd
Version               : 0.0.1
In tree               : global
Status                : enabled, up (pid 916) 4377 seconds
Type                  : classic
Description           : seatd daemon
Part of               : None
Notify                : 0
Max death             : 5
Earlier               : 0
Source                : /etc/66/service/seatd
Live                  : /run/66/scandir/0/seatd
Dependencies          : seatd-log
Required by           : slimski
Contents              : None
Optional dependencies : None
Start script          : 
                        #!/usr/lib/execline/bin/execlineb -P
                        /usr/lib/execline/bin/fdmove -c 2 1
                        /usr/sbin/seatd
Stop script           : 
                        None
Environment source    : None
Environment file      : None
Log name              : seatd-log
Log destination       : /var/log/66/seatd
Log file              : 
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
00:07:41.807 [INFO] [seatd/seatd.c:218] seatd stopped
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
00:04:55.152 [INFO] [seatd/seatd.c:218] seatd stopped
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
00:18:33.714 [INFO] [seatd/seatd.c:218] seatd stopped
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
00:05:42.310 [INFO] [seatd/seatd.c:218] seatd stopped
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started

It says seatd is enabled ( ie will start at boot) and up, with a lot of verbosity.
Notice it knows about dependencies. S6 handles dependencies among daemons ( runit does not handle dependencies).

Let us now find a daemon that is not running and see if we can start it. Will try sshd

# 66 status sshd
status: fatal: service: sshd is not parsed -- try to parse it using '66 parse sshd'

I think that means it is simply not running, because it is installed

# dpkg -l | grep ssh
ii  openssh-client                           1:9.2p1-2.0nosystemd1                           amd64        secure shell (SSH) client, for secure access to remote machines
ii  openssh-server                           1:9.2p1-2.0nosystemd1                           amd64        secure shell (SSH) server, for secure access from remote machines
ii  openssh-sftp-server                      1:9.2p1-2.0nosystemd1                           amd64        secure shell (SSH) sftp server module, for SFTP access from remote machines

Yes it is installed.
So we should be able to start it

# 66 start sshd
parse: fatal: unable to parse file of service: sshd

No such luck.
Obviously I need to do something else with sshd first… maybe it does not have a run script?
No, there is an sshd file in /etc/66/service and it contains a run script.
Service files are documented here
https://web.obarun.org/software/66/latest/66-frontend.html
but I can not find anything about what to do to start a service?

2 Likes

It seems to be something to do with scandir

sshd is not in the scandir

Do I have to put it there? Or do I need to put it in some tree maybe?

2 Likes

You need to

  • create a frontend file & place it under /etc/66/service (sudo nano /etc/66/service/sshd)
  • parse the frontend file (sudo 66 parse sshd)
  • start the service (sudo 66 start sshd)
  • optional to enable at startup run (sudo 66 enable sshd)

Simple as that

Edit just realised that the sshd frontend file exists (but has a mistake in syntax)

  • remove line with content:

@depends=boot@system

& reparse

2 Likes

There is already a file sshd in /etc/66/service
So I start at the second step

# 66 parse sshd
parse: fatal: unable to parse file of service: sshd

OK , so the frontend file that is present in /etc/66/service must be incorrect?

root@antix-init-diversity:/etc/66/service# cat sshd
[main]
@type=classic
@description="sshd daemon"
@version=0.0.1
@user=(root)
@notify=3
@depends=boot@system
[start]
@execute=(
    execl-toc -d /run/sshd -m0755 -g 81 -o 81
    foreground { mkdir -p /run/sshd }
	foreground { chmod 0755 /run/sshd }
	foreground { redirfd -w 1 /dev/null ssh-keygen -A }
	foreground { touch /var/log/lastlog }
	foreground { chgrp utmp /var/log/lastlog }
	foreground { chmod 664 /var/log/lastlog }
    /usr/sbin/sshd -D -e ${OPTS}
)

I would not know whether that is correct or not?
It might be the path

# which sshd
/sbin/sshd

No, /sbin and /usr/sbin are identical.

1 Like

More info @ProwlerGr

root@antix-init-diversity:/etc/66/service# 66 -v 4 parse sshd
parse: (parse_frontend(): 126): tracing: parse service: /etc/66/service/sshd
parse: (parse_frontend(): 141): tracing: read frontend service at: /etc/66/service/sshd
parse: (parse_split_from_section(): 76): tracing: parsing section: main
parse: (parse_split_from_section(): 161): tracing: parsing key: @type
parse: (parse_store_g(): 25): tracing: storing key: @type
parse: (parse_split_from_section(): 161): tracing: parsing key: @description
parse: (parse_store_g(): 25): tracing: storing key: @description
parse: (parse_split_from_section(): 161): tracing: parsing key: @version
parse: (parse_store_g(): 25): tracing: storing key: @version
parse: (parse_split_from_section(): 161): tracing: parsing key: @user
parse: (parse_store_g(): 25): tracing: storing key: @user
parse: (parse_split_from_section(): 161): tracing: parsing key: @notify
parse: (parse_store_g(): 25): tracing: storing key: @notify
parse: (parse_split_from_section(): 161): tracing: parsing key: @depends
parse: (parse_error(): 50): warning: invalid format of key: @depends: in section: main
parse: (parse_frontend(): 233): fatal: unable to parse file of service: sshd

Yes, the line

@depends=boot@system

needs to be deleted. Eric Vidal explained to me later that boot@system is not service, thats why it fails.
I fixed my other frontend files & got the services working, sshd must have been left behind

3 Likes

SUCCESS

root@antix-init-diversity:~# 66 parse sshd
parse: info: Parsed successfully: sshd-log at tree: global
parse: info: Parsed successfully: sshd at tree: global
root@antix-init-diversity:~# 66 start sshd
start: info: Initialized successfully: sshd
start: info: Initialized successfully: sshd-log
signal: info: Successfully started service: sshd-log

^Csignal: warning: received SIGINT, aborting transaction

root@antix-init-diversity:~# ps ax | grep ssh
19711 ?        S      0:00 s6-supervise sshd-log
19712 ?        S      0:00 s6-supervise sshd
19719 ?        Ss     0:00 /usr/bin/s6-log -d3 n3 s1000000 /var/log/66/sshd
20208 pts/0    S+     0:00 grep ssh

Thanks, more tomorrow

3 Likes

A few handy tips about 66.
If you want to see the system tree & service status, the following command comes very handy:

sudo 66 -z tree status -go name,contents

There is a good inbuilt help system that comes with 66, you just append -h after each command & it will explain options:

eg

66 -h

or

66 tree -h

or

66 parse -h

3 Likes

OK , lets try it

root@antix-init-diversity:/home/nevj#  66 -z tree status -go name,contents
Name        : boot
Contents    : \
              ├─elogind-log (pid=0, state=Disabled, type=classic, tree=boot)
              ├─dbus-log (pid=885, state=Enabled, type=classic, tree=global)
              ├─boot@system:system-hostname (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-run (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-tmp (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:populate-sys (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-pts (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-shm (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:populate-dev (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-cgroups (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:system-sysctl (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:udevd-log (pid=386, state=Enabled, type=classic, tree=boot)
              ├─boot@system:tty-earlier@tty12 (pid=304, state=Enabled, type=classic, tree=boot)
              ├─boot@system (pid=up, state=Enabled, type=module, tree=boot)
              ├─dbus (pid=912, state=Enabled, type=classic, tree=global)
              ├─boot@system:populate-run (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:populate-tmp (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─elogind (pid=0, state=Disabled, type=classic, tree=boot)
              ├─boot@system:mount-branch (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:system-random (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:system-hwclock (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:udevd (pid=492, state=Enabled, type=classic, tree=boot)
              ├─boot@system:udevadm (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:system-fontnkey (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:system-fsck (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:system-branch (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-rw (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:local-loop (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:local-sethostname (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:local-time (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:local-authfiles (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:mount-swap (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:local-dmesg (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:local-branch (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:runtime-branch (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:canopy (pid=up, state=Enabled, type=oneshot, tree=boot)
              ├─boot@system:tty-rc@tty1 (pid=942, state=Enabled, type=classic, tree=boot)
              └─boot@system:tty-rc@tty2 (pid=943, state=Enabled, type=classic, tree=boot)

Name        : global
Contents    : \
              ├─dbus-log (pid=885, state=Enabled, type=classic, tree=global)
              ├─seatd-log (pid=895, state=Enabled, type=classic, tree=global)
              ├─slimski-log (pid=893, state=Enabled, type=classic, tree=global)
              ├─connmand-log (pid=892, state=Enabled, type=classic, tree=global)
              ├─nmbd-log (pid=897, state=Enabled, type=classic, tree=global)
              ├─smbd-log (pid=890, state=Enabled, type=classic, tree=global)
              ├─ufw (pid=up, state=Enabled, type=oneshot, tree=global)
              ├─bluetoothd-log (pid=896, state=Enabled, type=classic, tree=global)
              ├─sshd-log (pid=0, state=Disabled, type=classic, tree=global)
              ├─dbus (pid=912, state=Enabled, type=classic, tree=global)
              ├─seatd (pid=914, state=Enabled, type=classic, tree=global)
              ├─nmbd (pid=913, state=Enabled, type=classic, tree=global)
              ├─smbd (pid=908, state=Enabled, type=classic, tree=global)
              ├─sshd (pid=0, state=Disabled, type=classic, tree=global)
              ├─connmand (pid=931, state=Enabled, type=classic, tree=global)
              ├─bluetoothd (pid=932, state=Enabled, type=classic, tree=global)
              └─slimski (pid=920, state=Enabled, type=classic, tree=global)

We need to interpret that
There are two trees called boot and global
boot contains all the system stuff needed at startup
global contains all the daemons installed and parsed

You can see my sshd and sshd-log in the global tree. They are not actually running at the moment because I have booted since I last started sshd, and I did not enable it.

So what does 66 parse sshd do. My guess is it reads the run script for sshd and makes some entries in the database.

Notice that every daemon process has to belong to a tree… there are no loners like in runit or s6-rc.

Lets start sshd again

root@antix-init-diversity:/home/nevj# 
[nevj@trinity ~]$ cat junk
root@antix-init-diversity:/home/nevj# 66 start sshd
start: info: Initialized successfully: sshd
start: info: Initialized successfully: sshd-log
signal: info: Successfully started service: sshd-log
^Csignal: warning: received SIGINT, aborting transaction

root@antix-init-diversity:/home/nevj# ps ax | grep ssh
 3654 ?        S      0:00 s6-supervise sshd-log
 3655 ?        S      0:00 s6-supervise sshd
 3662 ?        Ss     0:00 /usr/bin/s6-log -d3 n3 s1000000 /var/log/66/sshd
 4052 pts/0    S+     0:00 grep ssh

There is something wrong here
Why did I have to ^C the 66 start comand?
There is no sshd daemon running, only the s6-log process?

Lets look at its status

Name                  : sshd
Version               : 0.0.1
In tree               : global
Status                : disabled, up (pid 6306) 0 seconds, normally down
Type                  : classic
Description           : sshd daemon
Part of               : None
Notify                : 3
Max death             : 5
Earlier               : 0
Source                : /etc/66/service/sshd
Live                  : /run/66/scandir/0/sshd
Dependencies          : sshd-log
Required by           : None
Contents              : None
Optional dependencies : None
Start script          : 
                        #!/usr/lib/execline/bin/execlineb -P
                        /usr/lib/execline/bin/fdmove -c 2 1
                            execl-toc -d /run/sshd -m0755 -g 81 -o 81
                            foreground { mkdir -p /run/sshd }
                        	foreground { chmod 0755 /run/sshd }
                        	foreground { redirfd -w 1 /dev/null ssh-keygen -A }
                        	foreground { touch /var/log/lastlog }
                        	foreground { chgrp utmp /var/log/lastlog }
                        	foreground { chmod 664 /var/log/lastlog }
                            /usr/sbin/sshd -D -e ${OPTS}
Stop script           : 
                        None
Environment source    : None
Environment file      : None
Log name              : sshd-log
Log destination       : /var/log/66/sshd
Log file              : 
Extra argument ${OPTS}.
Extra argument ${OPTS}.
....

It says it is up but not enabled.
There is no process with PID 6306?
Perhaps the ^C killed it?

Do it all again without ^C

signal: info: Successfully stopped service: sshd
root@antix-init-diversity:/home/nevj# 66 start sshd
signal: info: Successfully started service: sshd-log

nevj@antix-init-diversity:~
$ ps ax | grep ssh
 3654 ?        S      0:00 s6-supervise sshd-log
 3655 ?        S      0:00 s6-supervise sshd
 3662 ?        Ss     0:00 /usr/bin/s6-log -d3 n3 s1000000 /var/log/66/sshd
11212 pts/0    S+     0:00 66 start sshd
11213 pts/0    S+     0:00 66 -v 1 signal -wU -u sshd
11216 pts/0    S+     0:00 66 -v 1 signal -wU -u sshd
11218 pts/0    S+     0:00 /usr/bin/s6-svlisten1 -U -- /run/66/scandir/0/sshd /usr/bin/s6-svc -u -- /run/66/scandir/0/sshd
11340 pts/1    S+     0:00 grep ssh

No it is not running sshd properly … it has hung somewhere in the process of starting it up … that is why the 66 start sshd command hangs.

While hanging its status is down

root@antix-init-diversity:/home/nevj# 66 status sshd
Name                  : sshd
Version               : 0.0.1
In tree               : global
Status                : disabled, down (exitcode 1) 0 seconds, want up, ready 0 seconds
Type                  : classic
Description           : sshd daemon
Part of               : None
Notify                : 3
Max death             : 5
Earlier               : 0
Source                : /etc/66/service/sshd
Live                  : /run/66/scandir/0/sshd
....

different to when I ^C'd it.
But, sshd-log is up

root@antix-init-diversity:/home/nevj# 66 status sshd-log
Name                  : sshd-log
Version               : 0.0.1
In tree               : global
Status                : disabled, up (pid 3662) 1269 seconds, ready 1269 seconds
Type                  : classic
Description           : sshd logger
Part of               : None
Notify                : 3
Max death             : 5
Earlier               : 0
Source                : /etc/66/service/sshd
Live                  : /run/66/scandir/0/sshd-log

So it can start the sshd-log daemon, or at least it thinks it has, but it hangs starting sshd.
PID 3662 is present

$ ps ax | grep 3662
 3662 ?        Ss     0:00 /usr/bin/s6-log -d3 n3 s1000000 /var/log/66/sshd

so, yes the sshd-log daemon is running.

I suspect there are still problems with /etc/s6/service/sshd script?

Try to get more info

root@antix-init-diversity:/home/nevj# 66 -v 4 start sshd
start: (debug_flag(): 74): tracing: requested flags to build the graph:  toparse topropagate wantup
.....
signal: (announce(): 230): info: Successfully started service: sshd-log
signal: (notify(): 155): tracing: sends notification U to: sshd from: sshd-log
signal: (async_deps(): 544): tracing: sshd acknowledges: U from: sshd-log
signal: (doit(): 374): tracing: sending -wU -u to: /run/66/scandir/0/sshd

The last line says it is sending something to /run/66/scandir/0/sshd.
That directory is present, and has contents
Hmm, I dont think I can solve it.

I can start sshd by typing /usr/sbin/sshd &
There is nothing wrong with the sshd binary

3 Likes

Problem could be with the frontend file.
I have noticed the void 66 frontend is different

See if this works better than the one already there.

  • Replace frontend file
    Then run:

sudo 66 remove sshd #removes old service from database
sudo 66 parse sshd #adds service from new frontend to databas
sudo 66 start sshd

1 Like

I can make it work by cutting all the sophistication out of the script

$ cat /etc/66/service/sshd
[main]
@type=classic
@description="sshd daemon"
@version=0.0.1
@user=(root)
@notify=3
[start]
@execute=( /usr/sbin/sshd -D )

then reconfigure and I get

$ ps ax | grep ssh
 4524 ?        Ss     0:00 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups
 9388 ?        S      0:00 s6-supervise sshd-log
 9389 ?        S      0:00 s6-supervise sshd
 9396 ?        Ss     0:00 /usr/bin/s6-log -d3 n3 s1000000 /var/log/66/sshd
 9876 ?        Ss     0:00 sshd: nevj [priv]
 9898 ?        S      0:00 sshd: nevj@pts/3
10030 ?        Ss     0:00 sshd: nevj [priv]
10054 ?        S      0:00 sshd: nevj@pts/4

PID 4524 is the daemon
Those last 5 lines are ssh logins… it is working

3 Likes

I can tell you’re already loving the new 66.

I will try your version


root@antix-init-diversity:/etc/66/service# cat sshd
[main]
@type=classic
@description="sshd daemon"
@version=0.0.2
@user=(root)

[start]
@execute=(
	foreground { exec ssh-keygen -A }
	 /usr/sbin/sshd -e -D 
)
root@antix-init-diversity:~# 66 reconfigure sshd
parse: info: Parsed successfully: sshd-log at tree: boot
parse: info: Parsed successfully: sshd at tree: boot
root@antix-init-diversity:~# ps ax | grep ssh
 4524 ?        Ss     0:00 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups
 9388 ?        S      0:00 s6-supervise sshd-log
 9389 ?        S      0:00 s6-supervise sshd
 9396 ?        Ss     0:00 /usr/bin/s6-log -d3 n3 s1000000 /var/log/66/sshd
 9876 ?        Ss     0:00 sshd: nevj [priv]
 9898 ?        S      0:00 sshd: nevj@pts/3
10030 ?        Ss     0:00 sshd: nevj [priv]
10054 ?        S      0:00 sshd: nevj@pts/4

Yes that works , and is a little more desirable than mine.

3 Likes

…& 3 different ways to enable autologin using 66

https://www.antixforum.com/forums/topic/antix-23-1_init-diversity-edition-sysvinit-runit-s6-rc-s6-66/page/15/#post-134260

Thanks for the rescue.
I vote for keeping scripts simple.

Yes it is easier to learn than s6-rc. I like the new 66 command without the minus.

My estimate of learning times ( all relative of course)
sysVinit 2 weeks
runit half an hour
s6-rc 1 month
s6-66 1 week
OpenRC 5 minutes
BSD RC 2 minutes
systemd half a lifetime
dinit ?
shepherd ?

Question:
Everything has to belong to a tree . Correct?

Can 66 automatically generate a script for a new service?

How do trees differ from bundles?

Can a service be in more than one tree?

Does parse modify the database? I assume there is a database?
It must record something somewhere, because you only need to do it once.

What can go wrong? Is it user-proof?. I can see 3 things

  • command line mistakes
  • problems with scripts
  • problems with dependencies

You basically have a sophisticated init system ( up at the systemd level) driven by one command.

My next step is to try and make some trees, so I can have various machine states that I can switch between … a bit like runlevels but on the fly… That is supposed to be the way future Linuxes will shape up.

I read something interesting. S6 is all written in C, and therefore will compile with musl or glibc. I believe systemd is not compatible with musl. So S6 should have no competitors for small devices and non-intel processors.

2 Likes

To my understanding (I don’t pretend to understand everything about 66/s6-rc etc):

  • Everything gets automatically added to the “Global” tree.
  • You can create other trees (similar to runlevels) & bring them up but only one tree can be up at a time.

I don’t know what you mean by automatic. The 66 frontend files need to be provided manually & 66 does parse these creating the relevant scripts.
eg
the sshd service we just created was parsed to:
/var/lib/66/system/service/svc/sshd
&
/var/lib/66/system/service/svc/sshd-log

A service can be in more than one tree, but only one tree can be up.
A tree is very similar to a runlevel.

2 Likes

This is correct, systemd is glibc linux only, s6 s6-rc & s6-66 can be compiled with musl therefore could be expanded to BSD & non-gnu systems.

This is the very reason Alpine has sponsored skarnet’s work & Void (although one of the earliest adopters of systemd), are also heavily invested in s6 (66 in particular)

3 Likes

I like it. Things are happening in some of my favorite distros.

Your effort to get s6-66 into Debian is not to be underrated either.

3 Likes

That ignores the “Root” tree. I assume it is out of user control

I get it. I can have Global and Global2 and switch between them like runlevels.

So that is different from bundles. In s6-rc I can make and run multiple bundles. Bundles is a lower level concept than trees

Why call it a tree… it does not have a branching structure?
It is just a list.

I could be wrong, maybe there can be more than one tree enabled:
https://web.obarun.org/software/66/latest/66-tree.html

User service frontends can be stored under
$HOME/.66/service & included in a “user” tree.

I admit I do have some gaps with all inits, so apologies if I have been misleading readers at times

3 Likes