This documentation explains the differences in options and interface changes between versions.
Changes between 0.8.2.2 and 0.9.0.0¶
66 no longer builds against skalibs, s6 or execline: the scanner, the supervisor, the logger, the fd holder and the privilege dropper are now native programs of the suite. Most of the ecosystem conversion is automatic -- see the upgrade and upgrade process pages.
Programs renamed¶
The borrowed s6/skarnet programs are now native to the suite.
| 0.8.2.2 | 0.9.0.0 |
|---|---|
s6-svscan |
66-scandir |
s6-supervise |
66-supervise |
s6-log |
66-log |
s6-svc |
66-svctl |
s6-fdholder-* |
66-fdholderd |
s6-setuidgid |
execl-runas |
66-oneshot |
removed -- handled by 66-oneshotd |
66-fdholder-filler |
removed -- handled by 66-fdholderd |
66-shutdown |
removed -- folded into 66 halt, 66 poweroff, 66 reboot |
66-shutdownd moves from bindir to libexecdir and should not be called directly.
66-eventd is a new daemon of the suite -- the event daemon of a scandir. Like 66-oneshotd and 66-fdholderd it is started by the scandir and is not called by hand.
Live directory renames¶
Two entries of the live scandir change name. Nothing has to be converted -- /run/66 is rebuilt from scratch at every boot, and the upgrade process rewrites the paths held in the resolve files of a running system. But a script that walks these paths by hand must be adjusted.
| 0.8.2.2 | 0.9.0.0 |
|---|---|
/run/66/scandir/<uid>/.s6-svscan |
/run/66/scandir/<uid>/.66-scandir |
/run/66/scandir/<uid>/fdholder |
/run/66/scandir/<uid>/fdholderd |
Frontend keyword table conversion¶
Several keys move to the section of their domain, and the TimeoutStart / TimeoutStop names merge into a single Timeout disambiguated by the section. The old placements and names still parse with a deprecation warning; if a key is declared both at its deprecated location and at its canonical section, the canonical section wins. Swapping a [Start] key into [Stop] or the reverse is now a parse error.
| 0.8.2.2 | 0.9.0.0 |
|---|---|
[Main] Notify |
[Start] Notify |
[Main] DownSignal |
[Stop] DownSignal |
[Main] StdIn / StdOut / StdErr |
[Execute] StdIn / StdOut / StdErr |
[Main] TimeoutStart |
[Start] Timeout |
[Main] TimeoutStop |
[Stop] Timeout |
[Main] MaxDeath |
[Start] MaxDeath |
[Logger] TimeoutStart |
[Logger] Timeout |
[Logger] TimeoutStop |
removed |
[Logger] Destination |
removed -- use [Execute] StdOut = 66log:/path |
Build |
deprecated and ignored -- the shebang decides the build type |
s6log (StdIn / StdOut / StdErr value) |
66log |
MaxDeath now means a crash budget and accepts 0-16 (0 = infinite restart). The new [Start] MaxDeathInterval key sets the budget window in milliseconds (default 30000).
[Execute] UMask is now read as octal, as its notation always implied. It was scanned in base 10, so every value was misread -- UMask = 022 applied 0026. The same frontend now applies 0022. A value with an 8 or a 9 in it is refused instead of silently accepted.
An environment value may no longer contain a newline or a NUL byte. \n, \012, \x0a and their NUL counterparts \0, \000, \x00 used to decode to the byte itself inside a quoted value; they are now a syntax error, in a frontend [Environment] section, in a service configuration file and in any file read by execl-envfile. Both bytes are separators of the internal layout, so such a value could never survive a round-trip -- the parse now fails loudly instead of corrupting it. This is a deliberate divergence from execline's envfile.
Identifiers (@U, @H, @R…) are no longer resolved at parse time only: an environment directory read at runtime -- the scandir environment, and a service environment loaded through execl-envfile -- now has them replaced as well. @I stays parse-time, since an instance name exists only there.
The event system¶
A service can now react to what happens on the system instead of being wired into the dependency graph. This is new ground, not a renaming: nothing in 0.8.2.2 maps to it.
| What | Where |
|---|---|
[Event] section |
turns any classic, oneshot or module service into a reactor -- EventType, From, On/OnAll, Do/Emit, Propagate |
Type = event |
a new service type: a non-supervised source (inotify, schedule, timer) that runs no process |
66 emit |
raise a user event by name, by hand or from a script |
66-eventd |
the daemon that routes events to the reactors |
66 also raises a few events itself -- boot.done, boot.failed, shutdown.begin, and env.<variable> / unenv.<variable> from 66 env. See the event system.
Command and option changes¶
| 0.8.2.2 | 0.9.0.0 |
|---|---|
66 scandir reload |
66 scandir reconfigure |
66 scandir create -s / --skeleton |
removed -- boot reads init.conf itself |
66 tree start -f |
removed |
66 tree create / admin -o rename= |
removed -- now an error |
66 status -o / 66 tree status -o |
-f / --field (-o deprecated) |
66 status -p nline |
removed -- use 66 log |
66 resolve / 66 state / 66 tree resolve |
gain -f / --field and -n / --no-name (they took only -h) |
66 signal |
gains --stop-group / --cont-group / --kill-group, which signal the whole process group |
66-shutdown |
66 halt / 66 poweroff / 66 reboot (with -c / --cancel) |
Every command and subcommand now accepts long options too (--help, --verbosity, --live, --tree, --timeout, --color, and per-command forms). Short options are unchanged, so existing scripts keep working.
66 status fields¶
66 status is rewritten around the state of the service -- durations are printed in human form and the line says who acted on the service -- and its field vocabulary shrinks from 25 names to 12. A script selecting fields with -o/-f must be adjusted.
| 0.8.2.2 | 0.9.0.0 |
|---|---|
intree |
tree |
logfile |
removed -- use 66 log |
version, partof, notify, maxdeath, earlier, live, optsdepends, start, stop, envat, envfile, stdin, stdout, stderr |
removed -- 66 resolve reports them, under its own field names (inns, optsdeps, envdir, run_user, stdintype/stdindest…) |
logname |
removed -- a logger is now the boolean logger field of the resolve, and its name is always <service>-log |
| -- | enabled, pid and log are new |
The kept names are name, status, description, type, source, tree, depends, requiredby and contents.
New commands¶
| Command | Action |
|---|---|
66 log |
read the logs of a service, of the system, or of everything interleaved |
66 emit |
raise a user event by name |
66 env |
publish session variables (DISPLAY, XAUTHORITY…) to every service of the scandir |
66 runstate |
dump a service's runtime record |
66 fdholder |
manage the scandir's fd holder daemon |
66 suspend |
suspend the system to RAM |
66 hibernate |
hibernate the system to disk |
66 env is unrelated to the 66-env of 0.6.x, which became 66 configure back in 0.7.0.0: configure edits the versioned configuration file of one service, env publishes a value to every service at runtime.
init.conf¶
| Key | Change |
|---|---|
VERBOSITY |
default 1 -> 2 |
TREE |
removed from the skeleton, still honored, empty by default (group mode) |
CONTAINER |
removed -- use 66 boot -c |
RCINIT / RCINIT_CONTAINER / RCSHUTDOWN / RCSHUTDOWNFINAL / RESCAN |
removed |
The rc.init, rc.init.container, rc.shutdown and rc.shutdown.final skeleton scripts are gone; boot and shutdown now run in C.
Changes between 0.7.2.1 and 0.8.0.0¶
Further information can be found on the upgrade page concerning behavior changes, frontend keyword changes and more.
Converting service frontend file¶
The upgrade process will handle the frontend file conversion, but only for active services (i.e., those listed when running 66 tree status with the field contents).
So, you may need to manually convert inactive frontend files. The following little script can be used by calling ./migrate_service.sh /path/to/my/<FrontendFile>.
#!/bin/sh
service="${1}"
sed -e "s:\[main\]:\[Main\]:g" \
-e "s:@type:Type:g" \
-e "s:@description:Description:g" \
-e "s:@version:Version:g" \
-e "s:@depends:Depends:g" \
-e "s:@requiredby:RequiredBy:g" \
-e "s:@optsdepends:OptsDepends:g" \
-e "s:@options:Options:g" \
-e "s:@flags:Flags:g" \
-e "s:@notify:Notify:g" \
-e "s:@user:User:g" \
-e "s:@timeout-kill:TimeoutStart:g" \
-e "s:@timeout-up:TimeoutStart:g" \
-e "s:@timeout-finish:TimeoutStop:g" \
-e "s:@timeout-down:TimeoutStop:g" \
-e "s:@maxdeath:MaxDeath:g" \
-e "s:@down-signal:DownSignal:g" \
-e "s:@hiercopy:CopyFrom:g" \
-e "s:@intree:InTree:g" \
-e "s:\[start\]:\[Start\]:g" \
-e "s:@build:Build:g" \
-e "s:@runas:RunAs:g" \
-e "s:@execute:Execute:g" \
-e "s:\[stop\]:\[Stop\]:g" \
-e "s:\[logger\]:\[Logger\]:g" \
-e "s:@destination:Destination:g" \
-e "s:@backup:Backup:g" \
-e "s:@maxsize:MaxSize:g" \
-e "s:@timestamp:Timestamp:g" \
-e "s:\[environment\]:\[Environment\]:g" \
-e "s:\[regex\]:\[Regex\]:g" \
-e "s:@configure:Configure:g" \
-e "s:@directories:Directories:g" \
-e "s:@files:Files:g" \
-e "s:@infiles:InFiles:g" \
-i ${service}
Keyword table conversion¶
The table below gives you the keyword conversion between versions
| 0.7.2.1 | 0.8.0.0 |
|---|---|
| [main] | [Main] |
| @type | Type |
| @description | Description |
| @version | Version |
| @depends | Depends |
| @requiredby | RequiredBy |
| @optsdepends | OptsDepends |
| @options | Options |
| @flags | Flags |
| @notify | Notify |
| @user | User |
| @timeout-kill | TimeoutStart |
| @timeout-up | TimeoutStart |
| @timeout-finish | TimeoutStop |
| @timeout-down | TimeoutStop |
| @maxdeath | MaxDeath |
| @down-signal | DownSignal |
| @hiercopy | CopyFrom |
| @intree | InTree |
| [start] | [Start] |
| @build | Build |
| @runas | RunAs |
| @execute | Execute |
| [stop] | [Stop] |
| [logger] | [Logger] |
| @destination | Destination |
| @backup | Backup |
| @maxsize | MaxSize |
| @timestamp | Timestamp |
| [environment] | [Environment] |
| [regex] | [Regex] |
| @configure | Configure |
| @directories | Directories |
| @files | Files |
| @infiles | InFiles |
Changes between v0.6.1.3 and 0.7.0.0.¶
Further information can be found on the upgrade page concerning behavior changes, frontend keyword changes and more.
General Interface changes¶
Generally, the prefix is removed from commands, for example, 66-enable becomes 66 enable, 66-start becomes 66 start, and so on except for a few special commands -- see below.
Debug command¶
| Old command | New command |
|---|---|
66-parser |
66 parse |
66-inresolve |
66 resolve |
66-instate |
66 state |
Admin command¶
| Old command | New command |
|---|---|
66-boot |
66 boot |
66-scandir |
66 scandir |
66-scanctl |
incorporate into 66 scandir |
66-init |
66 init |
66-svctl |
66 signal |
66-dbctl |
removed |
66-hpr |
66-hpr. This command should not be used directly. Prefer using 66 poweroff, 66 reboot, 66 halt to power off, reboot and halt the machine respectively |
66-shutdownd |
66-shutdownd |
66-update |
removed |
User command¶
| Old command | New command |
|---|---|
66-all |
66 tree |
66-tree |
66 tree |
66-enable |
66 enable |
66-disable |
66 disable |
66-start |
66 start |
66-stop |
66 stop |
66-intree |
66 tree status |
66-inservice |
66 status |
66-env |
66 configure |
66-shutdown |
66 poweroff, 66 reboot, 66 halt to power off, reboot and halt the machine respectively |
Extra tools¶
| Old command | New command |
|---|---|
66-echo |
66-echo |
66-nuke |
66-nuke |
66-umountall |
66-umountall |
execl-envfile |
execl-envfile |
New command¶
| Command | Action |
|---|---|
66 reload |
reload a service |
66 restart |
restart a service |
66 free |
unsupervise a service |
66 reconfigure |
parse again a service |
66 remove |
remove a service |
66 poweroff |
poweroff the system |
66 reboot |
reboot the system |
66 halt |
halt the system |
66 version |
get the version of 66 |
General options changes¶
Previous tools accepted the options -h, -z, -l, -T and -t. These options are now integrated into the general 66 command. Let's take an examples:
| Old command | New command |
|---|---|
66-enable -t root consolekit |
66 -t root enable consolekit |
66-start -l /run/66 sshd |
66 -l /run/66 start sshd |
Help accessibility¶
All commands and subcommands accept the -h option to access their respective help.
66-h: get the help of the general command66tree -h: get the help of the tree subcommand66tree resolve -h: get the help ofresolvesubcommand of thetreesubcommand
General exit codes¶
All commands and subcommands return:
- 0 success
- 100 wrong usage
- 111 system call failed
Interface and Options changes by command¶
If not specified, the interface (except for the name itself -- see General Interface changes) or the options do not change.
66-scandir¶
66-scandir and 66-scanctl was combined together into the command 66 scandir.
| old options | new options |
|---|---|
66-scanctl interrupt |
66 scandir stop |
66-scanctl reload |
66 scandir reconfigure |
66-scanctl reboot |
removed |
66-scanctl poweroff |
removed |
New subcommands was integrated to 66 scandir to avoid using options from s6-svscanctl.
66 scandir |
s6-svscanctl |
|---|---|
66 scandir rescan |
s6-svscanctl -a |
66 scandir abort |
s6-svscanctl -b |
66 scandir nuke |
s6-svscanctl -n |
66 scandir annihilate |
s6-svscanctl -N |
66 scandir zombies |
s6-svscanctl -z |
66-init¶
As s6-rc was dropped, the specification of the type of the service is not needed anymore. This program was integrated into the 66 tree command -- see the 66 tree init documentation for further information.
| old argument | new argument |
|---|---|
66-init classic |
66 tree init treename |
66-init database |
66 tree init treename |
66-init both |
66 tree init treename |
66-svctl¶
This tool previously deals only with classic service whereas 66 signal deals with all kind of services type.
| old options | new options |
|---|---|
66-svctl -n |
removed |
66-svctl -X |
66 signal -x -d |
66-svctl -K |
66 signal -k -d |
66-all¶
This tool previously handles all services for trees, the new command handles all enabled services for trees.
| old argument | new argument |
|---|---|
66-all up |
66 tree start |
66-all down |
66 tree stop |
66-all unsupervise |
66 tree free |
66-tree¶
| old options | new options |
|---|---|
66-tree -n |
66 tree create |
66-tree -a |
66 tree admin -o allow=user,user,... or at creation with 66 tree create -o allow=user,user,... |
66-tree -d |
66 tree admin -o deny=user,user,... or at creation with 66 tree create -o deny=user,user,... |
66-tree -c |
66 tree current |
66-tree -S |
66 tree admin -o depends=tree,tree,... or at creation with 66 tree create -o depends=tree,tree,... |
66-tree -E |
66 tree enable |
66-tree -D |
66 tree disable |
66-tree -R |
66 tree remove |
66-tree -C |
removed |
66-enable¶
With the previous version, services must be enabled to be able to start the service. It is not mandatory anymore with the new version. A service can be started without enabling it first. As result, the enable process is not responsible of the parse process even if it parse the service if the service was never parsed before.
| old options | new options |
|---|---|
66-enable -f |
66 enable |
66-enable -F |
66 reconfigure |
66-enable -I |
66 parse -I |
66-enable -S |
66 enable -S |
66-disable¶
| old options | new options |
|---|---|
66-disable -S |
66 disable -S |
66-disable -F |
removed |
66-disable -R |
66 remove |
66-start¶
| old options | new options |
|---|---|
66-start -r |
66 reload |
66-start -R |
66 restart |
66-stop¶
| old options | new options |
|---|---|
66-stop -u |
66 free |
66-stop -X |
66 signal -x |
66-stop -K |
66 signal -k -d |
Converting service frontend file¶
Manual intervention is required to upgrade the frontend file to version 0.7.0.0, as both the longrun and bundle types have been eliminated. Additionally, certain fields have been altered, deprecated, or removed.
-
The
longruntype should be converted to theclassictype. To achieve this, simply replace@type=longrunwith@type=classic. This conversion is performed by 66 during the parse process, but the change is not applied to the frontend file. -
The
@extdepends=field has been removed and has no effect. To address this, switch the service definition in this field to the@depends=field. For example, a service declaring@depends=(consolekit)and@extdepends=(dbus)should be converted by removing the@extdependsfield and appending dbus to the@depends=(dbus consolekit)field. -
The
@shebangfield is deprecated and will be removed in a future release. To define the shebang for your script, place it at the beginning of the@executefield right after the opened parentheses, without any space, new line, or other characters. For example, for an sh script, the beginning of the @execute field must be@execute = (!#/usr/bin/sh echo myscript .... )The incorrect way is
@execute = ( #!/usr/bin/sh echo myscript .... )The following is also incorrect
@execute = ( #!/usr/bin/sh echo myscript .... )Failure to adhere to the correct syntax will result in an
Error formatduring the execution of the service. -
The
bundletype no longer exists. To achieve a similar behavior, you can emulate the functionality of abundleby using aoneshottype. Define the@depends=field with the service name previously defined in yourbundletype under the@contentsfield. The@executefield of theoneshotservice should simply be defined astrue. For instance, the following bundle[main] @type=bundle @version=0.0.1 @description="launch network" @user=(root) @contents=(connmand openntpd)will be converted to following
oneshotservice[main] @type=oneshot @version=0.0.1 @description="launch network" @user=(root) @depends=(connmand openntpd) [start] @execute=(true)Certainly, you can replace the
bundletype with themoduletype. However, depending on your specific cases, themoduletype might overcomplicate the service itself. -
The
moduletype must be redefined from scratch due to significant changes in the directorymodulestructure. Refers to the module-creation documentation for detailed information.
Cleaning the 66 directories and files¶
The heart structure of 66 has been reframed, resulting in a simplified directory architecture. Clean unused files and directories from the previous release by following the instructions below. Additionally, refer to the deeper understanding documentation about the 66 architecture.
/var/lib/66¶
You can safely remove the following directories and files:
-
/var/lib/66/currentdirectory. -
/var/lib/66/system/:Any other directories and files except for the
/var/lib/66/.resolveand/var/lib/66/servicedirectories from this directory.
The exact same task applies to the ${HOME}/.66 directory. Also, you can remove the ${HOME}/.66/module directory.
/etc/66¶
You can safely remove the following /etc/66/module directory.