alterator-cmdline(8)
| alterator-cmdline(8) | Alterator user manual | alterator-cmdline(8) |
NAME
alterator-cmdline - command line interface to alteratord.
SYNOPSIS
alterator-cmdline [-ld] [-k name] command
DESCRIPTION
This is an utility to create a single request to system configuration backend from command line. Query result will be sent to stdout. Errors, e.g., exceptions from backends, will be sent to stderr.
Command format is:
backend arg1 value arg2 value2 ...
Backend typically returns one or more answers. Each answer is a set of attributes and values.
Output format is:
<empty line>
arg1:value1
arg2:value2
<empty line>
arg1:value3
arg2:value4
...
Each answer starts with an empty line.
alterator-cmdline prints all attributes and their values by default. You can use -k option to print specified attribute's value only. This is useful in shell scripts.
Output format in this case is:
value1
value3
...
Multiple answers are not separated.
There are two possible modes: basic and local.
In basic mode utility will try to connect to already running alteratord.
Local mode is designed for development. alterator-cmdline will try to stop already running alteratord and start it as its own subprocess; in its turn, alteratord's subprocess will work in local mode too and exit when alterator-cmdline exits. Because command line interface exits after receiving an answer from backend, you can only work with stateless backends in this mode.
EXAMPLE
alterator-cmdline -k name /users action list
alterator-cmdline /users name "test" action write gecos "test
user"
EXIT CODE
On success zero is returned, otherwise non-zero status indicates request failure (backend exception or some internal error).
OPTIONS
- -l, --local
- Work in local mode.
- -d, --debug
- Turn on additional debug in Scheme interpreter. This is useful for debugging alterator-cmdline itself.
- -k, --key <name>
- Print values for the specified attribute only.
AUTHOR
Stanislav Ievlev <inger@altlinux.org>
SEE ALSO
| 7/04/2009 | ALT Linux |
