This documentation explains the differences in options and interface changes between versions.
Changes between 0.7.2.1 and 0.8.0.0¶
Futhers information can be found to the upgrade page concerning behavior changes, frontend keyword changes and more.
Converting service frontend file¶
The upgrade process will take about the frontend file convertion but uniquely active services (i.e., those listed when running 66 tree status with the field contents)
So, you may need to convert manually inactive frontend file. This 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 convertion¶
The table below give you the keyword convertion 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.¶
Futhers information can be found to 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-shutdown. This command should not be used directly. Prefer using 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 to 66 tree command -- see 66 tree init documentation for futhers 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 our 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 incorret 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.