Trees¶
A tree is a named set of services. You bring the set up or down as one, and you decide which sets a boot brings up.
Why bother¶
The usual example. You have three groups of things:
| Tree | Services |
|---|---|
net |
dhcpcd, wpa_supplicant, a time daemon |
print |
cupsd, a network filesystem |
graphic |
the X server, dbus, a notification daemon |
Boot into a console session with only net enabled, and that is all that
starts. Later, print something: 66 tree start print brings up everything
printing needs, and 66 tree stop print puts it all away again, without you
having to remember which daemons were involved.
The two trees you already have¶
globalis created for you. A service enabled without naming a tree lands here. Delete it and the next 66 command recreates it.bootappears when the boot module is enabled. It holds what brings the machine up.
Create and populate¶
# 66 tree create net
# 66 tree enable net
# 66 -t net enable dhcpcd wpa_supplicant
# 66 tree start net
66 tree enable is what makes the tree start at the next boot. Creating it is
not enough.
The -t option also creates a tree that does not exist yet, so the explicit
create above is optional. It is written out here because being explicit costs
one line and saves a surprise.
Trees can be configured at creation time:
for instance, depends= names trees that must start first and so, every services associated to the tree net.
Inspect¶
The fields are name, current, enabled, allowed, groups, depends,
requiredby and contents.
Start, stop, free¶
stop brings the services down but leaves them supervised. free also removes
them from supervision and free any resources used by the service.
The current tree¶
After this, 66 commands taking -t act on net without you passing the option.
Groups¶
A tree can belong to a group: boot, admin, user, or none. Only the boot
group currently changes behaviour.
Trees in the boot group cannot be enabled by hand
66 tree enable refuses on a tree in the boot group. Those trees are
managed by 66 itself during boot: it initiates every tree of the boot
group, or only the tree named by TREE= in /etc/66/init.conf when that
key is set.
This is why the install from an Arch host only
enables boot@system and never enables the boot tree.
Removing¶
This is the supported way to get rid of a tree. Deleting directories by hand is not.