Clockwork

cw-localsys(8)

NAME

cw-localsys - Clockwork Agent System Tool

SYNOPSIS

cw-localsys ACTION [args ...]

DESCRIPTION

Clockwork is a configuration management system designed to securely and correctly enforce configuration policies on lots of hosts.

It can ensure that files have the right attributes (owner, group, permissions, etc.) and content. It can maintain a specific set of installed packages, and even make sure that system user accounts exist.

cw-localsys is a utility script that is utilized by cogd to handle platform-specific things like package installations and service management. It inspects the system environment to determine the correct tools to use to (for example) restart services or install pacakges.

INFORMATIONAL ACTIONS

identify

Autodetect the local system type, and then print that information.

SERVICE ACTIONS

svc-run-status SERVICE

Determine whether or not the service is running (per LSB semantics).

An exit code of 0 indicates that the service is running. Any other value indicates either that the service is stopped, or that the init script had other issues (dead locsk, missing PID file, etc.)

svc-boot-status SERVICE

Determine whether or not the service is configured to start at boot, on the current runlevel.

An exit code of 0 indicates that the service will start at boot. Any other value indicates otherwise.

svc-init SERVICE VERB

Run the services init script, using VERB as the action (i.e. start, stop, reload, etc.).

Exits 0 if the action succeeded, or non-zero if it failed.

svc-enable SERVICE

Set the service to start on boot.

Exits 0 on success, or non-zero if it failed.

svc-disable SERVICE

Prevent the service from starting on boot.

Exits 0 on success, or non-zero if it failed.

PACKAGE ACTIONS

pkg-version PACKAGE

Prints out the installed version of the named package.

Exits 0 if the package is in fact installed. Otherwise, exits non-zero, and nothing will be printed.

pkg-latest PACKAGE

Query upstream repositories (APT, YUM, etc.) to determine the latest available version of the named package.

Exits 0 if the package is available upstream. In this case, the latest candidate version is printed to standard output. Otherwise, exits non-zero to indicate that the package is not available for installation.

pkg-version PACKAGE VERSION

Install the package at the given version. If VERSION is the string "latest", the latest available version will be installed.

An exit code of 0 indicates that the install succeeded.

pkg-remove PACKAGE

Uninstall the named package.

Exits 0 on success.

EXIT CODE

For known actions on known platforms, exit codes depend solely on the action being executed.

Otherwise, cw-localsys exits:

125

An unknown action was specified.

126

Unable to detect the local system type.

SEE ALSO

clockwork(7), clockd(1), clockd.conf(5) and cogd.conf(5)

AUTHOR

Clockwork was designed and written by James Hunt.

The Clockwork website is licensed under the Creative Commons Attribution-NoDerivs 3.0 United States License