NCM::Component::Systemd::Service::Chkconfig is a class handling services that can be controlled via (older) chkconfig.
Returns a new object, accepts the following options
A logger instance (compatible with
Return hash reference with current configured units determined via
(No type to specify,
sysvtype is forced).
Return the current target based on legacy
Return the default target based on legacy
treehash reference and builds up the units to be configured. It returns a hash reference with key the unit name and values the details of the unit.
This method converts the legacy states as following
- del : masked
- add: disabled
- off : disabled
- on : enabled
- reset: this state is ignored / not supported.
make_cache_alias). (Returns 0 or 1).
A unit is possible_missing if
the unit is in state masked or disabled (i.e. unit that is not expected to be running anyway).
Other then pure systemd, chkconfig state off always implies that a disabled service unit is not running.
Create, set and return the
runlevel2targetmap (will reset existing one, return is merely for testing).
Convert the chkconfig levels to new systemsctl targets
legacylevelis a string with integers e.g. "234". Retrun a array reference with the targets.
default_runlevelreturns the default runlevel via the INITTAB file. If that fails, the default DEFAULT_RUNLEVEL is returned.
Return the current legacy runlevel.
The rulevel is determined by trying (in order)
who -r. If both fail, the
default_runlevelmethod is called and its value is returned.