66
www.obarun.org
66-enable
This command enable a service(s) into a tree.
Interface
66-enable [ -h help ] [ -v verbosity ] [ -l live ] [ -t tree ] [ -f force ] [ -d directory ] [ -I instance ] [ -S start ] service(s)"
66-enable will handle service on a specific tree. This tool
will expect to find a service file by default
at /etc/66/service. The default can also be changed at compile-time
by passing the --with-service-path=DIR option to
./configure. It will run a parsing process and write the result
at the directory of the tree—see 66-tree
for futher information. The service will be available on the
tree for the next boot time depending of the state of the
tree or can be started directly—see
-S options below.
service as arguments can be multiple.
Options
- -h : print the help.
-
-v verbosity : increase/decrease
the verbosity of the command. 1(Default): Only print
error messages. 2: Also print warning messages.
3: Also print debugging messages.
-
-l live : live directory to
start the supervision of service. Default is /run/66. The default can
also be changed at compile-time by passing the --livedir=live
option to ./configure. An absolute path is expected and
should be under a writable filesystem - likely a RAM filesystem and
also already exist—see 66-scandir.
-
-t tree : tree used to store
the service file. This options is mandatory
except if the option -c has been invoked on
66-tree tool.
-
-f : overwrite an existing service. If the
service is already enabled, the parsing and write process will
overwrite it.
-
-d directory : enable all service files
found at directory where service is the first service
to start—see directory. directory
may or may not be an absolute path. In case of relative path, directory
must exist by default at /etc/66/service depending of
the option given at compile-time. In case of absolute path, the current
user of the process need to have sufficient permissions to read directory.
In both case 66-enable expect to find a valid services file inside directory.
-
-I instance : create a instance
service from service template where service must contain a '@'
at the end of the name. For example : 66-enable -I tty1 tty@. This will create the service
tty1 from the template tty@.—see instance
service file.
-
-S : start service after the enable
process. If the state of service is already up, this option
will have no effects. If the state of service is already up
and the -f option is invoked, service will be reloaded.
Directory option
This option should be used on specific case like a set of bundle,longrun,oneshot
service type which several of them depends from each others. This doesn't mean that
the directory can only contain bundle,longrun,oneshot, it can be a mix of
all service type. The perfect example is the set of service for the boot process. To achieve
this specific tasks a large number of oneshot service is used but also contain "classic"
service.
It can be difficult to know the first service to start on a dependencies service graph.
To avoids problem about the resolution of the services dependencies graph, it's
neccessary to pass the first service to start as arguments. In general, the root node
of a service dependencies graph is a bundle.
Also this behaviour can be change on future release of 66-enable tool.