66

Software

obarun.org

66-enable

This command enables one or more services inside a given tree.

Interface

    66-enable [ -h ] [ -z ] [ -v verbosity ] [ -l live ] [ -t tree ] [ -f|F ] [ -I ] [ -S ] service(s)

This tool expects to find a corresponding frontend service file, a directory name (see directory) or a service instance (see instance), by default at /etc/66/service or /usr/share/66/service in this order of precedence for root user and $HOME/.66/service, /etc/66/service or /usr/share/66/service in this order of precedence for a normal user. The default path can be changed at compile time by passing the --with-system-service=DIR, --with-sysadmin-service=DIR and --with-user-service=DIR to ./configure. It will run a parser on the frontend service file and write the result to the directory of the given tree—see 66-tree. The service will then be available in the given tree for the next boot depending on the state of the tree. The targeted service(s) can also be started on the fly when enabling it with the -S option.

The absolute path of the frontend service file can also be set. In this case, the primary path of this absolute path must match /usr/share/66/service or /etc/66/service or $HOME/.66/service directory name e.g /usr/share/66/service/nptd/0.1.1/nptd.

Multiple services can be enabled by seperating their names with a space.

Exit codes

Options

Dependency handling

For services of type bundle, module or atomic any existing dependency chain will be automatically resolved. It is unnecessary to manually define chained sets of dependencies. If FooA has a declared dependency on another service with the name FooB then FooB will be automatically enabled too when enabling FooA. This works recursively until all necessary dependencies are enabled.

Directory name as service

When choosing to make a directory to be recognised as service the path of the directory must exist by default at /etc/66/service, /usr/share/66/service or $HOME/.66/service depending of the owner of the process and the option given at compile time. All service files found in this directory will be enabled. This process is done recursively if a sub-directory is found till it not found other directories into the sub one. The directory can contain a mixed set of bundle, atomic services where some of those depend on each other. The directory option is not limited to these types though. Any available service type can be part of the set.

A good example is a set of services for the boot process. To achieve this specific task a large number of oneshot services is used along with some classic services.

The parser automatically resolves any existing dependency chain for the processed services just as it would for any regular service.

(!) This option and its mechanisms can be subject to change in future releases of the 66-enable tool.

Instantiated service

An instanced service name from a service template can be passed as argument where the name of the service must end with a @ (commercial at).—see frontend service file.

(!) The name of the template must be declared first immediately followed by the instance name as shown in the following example:

66-enable tty@tty1

Also instanced services can be declared on the @depends field of the frontend service file.

Service configuration file

If the environment section is set on the frontend service file, the parse result process can be found by default at /etc/66/conf for root, $HOME/.66/conf for a user. The default path can be changed at compile time by passing the --with-sysadmin-service-conf=DIR for root and --with-user-service-conf=DIR for a user.