cfmdb - manage global aspects of a cfm database
cfmdb {--initdb}
cfmdb {--init -i} {--host -h} <host>
cfmdb {--init -i} {--rpm -r} [--all -a] [<rpm> ...]
cfmdb {--init -i} {--set -s} <set> {<file> | <symlink>} [...]
cfmdb {--hostset -h} <host> [...]
[--add -a] [--delete -d] [--da] [<set> ...]
cfmdb {--query -q} [--all -a] [--counts -c]
[--host -h] [<host> ...]
[--list -l]
[--set -s] [<set> ...]
[--file -f] [<file> ...]
cfmdb {--erase -e} [--all -a]
[--host -h] [<host> ...]
[{--set -s} <set> ...] [{--file -f} <file> ...]
[-F <file> ...] [-L <symlink> ...]
cfmdb {--version}
cfmdb {--verbosity -v} <level>
The cfmdb cmd is used to install, initialize, and configure the cfm database (cfmdb). Use it to create a new cfmdb, to install or erase hosts, to manipulate hosts' set lists, to install, erase, or modify the content of sets, and to query the cfmdb about its content.
Use the --initdb option to create a new cfm database (cfmdb). This verifies the CFMROOT env var is set, creates cfm dirs and admin files, and initializes the `all' set identified in CFMROOT/allfiles. The $CFMROOT dir should be NFS mountable by all hosts that use this cfmdb. On a typical linux server the cfmdb will contain around 750-1000 config files and be about 10MB in size. Note security concerns related to sysadmin in L<assumptions>. Repeating execution of this cmd will not overwrite < existing entries.
{--host -h} <host>
Use the -h init sub-option to install a new host entry in the
cfmdb. Host entries are created with the mandatory preemptive set
list. Use the cfmdb --hostset option to extend it. The host specific
files listed in CFMROOT/hsfiles and the SVR4 runcmd symlinks are
initialized and uploaded from the executing host using <host> as the
set name. See L<cfmh> for more on runcmd symlinks. Note that you
must execute this cmd on <host> for the files to be correctly
initialized. Note host name syntax: /^[a-z]+[a-z0-9.-]*$/
{--rpm -r} [--all -a] [<rpm> ...]
Use the -r init sub-option to initialize the cfmdb for the config
files of one or more rpms. For each rpm specified the rpmdb is
queried to id its config files. Thus the rpms must already be
installed on the executing host. For each config file a cfmdb
rcsfile is initialized using the rpm name as the set tag. If the -a
option is specified config files for all rpms installed on the
executing host are processed.
{--set -s} <set> [[--] {<file> | symlink} ...]
Use the -s <set> init sub-option to create or add new files to a set
made from an arbitrary collection of config files. For each config
file a cfmdb rcsfile is initialized and uploaded with a version
tagged with the supplied <set> name. Note setname systax:
/^[a-zA-Z]+[a-zA-Z0-9+-]*$/
NOTE: Files added to the cfmdb using this cmd will NOT be found
using the default set. You must add the set name to the host's
preemptive set list on the hosts that use the file.
Use the -h <host> option to add, delete, or resequence a host's
optional extensions to its mandatory preemptive set list. A
host's hostset entry contains 4 mandatory items:
<host_id> <ref_set> <pnp_set> <hostname_set>
The host_id is an identifier string, not a set name.
See L<overview> for info about the mandatory special sets.
With no sup-options the -h <host> option is the equivalent of a
query, ie it returns the hosts set list. Also note that the -d and
-a options together will replace the set list. Ie they are the
equivalent of the --da option.
[--add -a] <set> [...] Use the -a sub-option to add new sets to the host's preemptive set list. The new sets are suffixed to the existing set list. Note setname syntax: /^[a-zA-Z]+[a-zA-Z0-9+-]*$/
[--delete -d] <set> [...] Use the -d sub-option to delete set(s) from a host's preemptive set list.
[--da] [<set> ...] Use the --da sub-option to delete a host's preemptive set list and replace it with a new list. This is required when you need to resequence an optional preemptive set list to change the order in which sets are selected. Note: do not include the mandatory `ref, <pnp>, <host>' sets in the new list. They will be prefixed to your supplied list.
Query the cfmdb about statistical counts, hosts, sets, and files.
[--counts -c] Use the -c option to list a count of rcsfiles, sets, and file version instances currently in use in the cfmdb.
[--all -a] Query for all hosts, sets, or files. The -a option has no affect on the -c option.
[--host -h] [<host> ...] Use the -h option to list the entries for one or more hosts. Combine it with the -a option to list them all. All is the default when no host names are supplied.
[--list -l] Use the list option with the -s option to list the files in each set or with the -f option to list the sets which exist for each file. The list option has no effect on the -c and -h options.
[{--set -s} <set> ...]
Use the -s option to list one or more sets and a count or their
member files. Processes all sets in the cfmdb with the -a option.
All is the default when no set is supplied. Lists all files in each
set with the -l option.
[{--file -f} <file> ...]
Use the -f option to list one or more files and a count of the sets
for each one. Processes all files in the cfmdb with the -a option.
Lists all sets in each file with the -l option.
Erase hosts, sets, or files.
[--all -a]
Erasing hosts from the cfmdb is pretty straight forward. Erasing
files or sets is more complex. Erasing either all sets or all files
would effectively erase the entire cfmdb and we don't need special
cmds for that. If you start with a set you can erase part of it, ie
remove one or more of the files from membership in the set. If you
start with a file you can erase its membership in one or more sets.
These are the same. Erasing all the files in a set erases the set.
Erasing all of the set memberships in a file erases the file. These
are not the same. So when you use the -a option with the -s or -f
option carefully note that:
-as <set> implies all files OF a set,
NOT all sets. This deletes a set from the cfmdb.
-af <file> implies all sets memberships OF a file,
NOT all files. This deletes a file from the cfmdb.
[--host -h] [<host> ...] Use the -h suboption to erase one or more hosts from the cfmdb. The -ha combination would remove all hosts.
[{--set -s} <set> ...] [{--file -f} <file> ...]
[-F <file> ...] [-L <symlink> ...]
Use the -s suboption with the -a suboption to erase all of a set.
Use the -s suboption with the -f suboption to erase the set from
one or more files or symlinks that exist on the host. Use it with
the -F or -L suboptions to erase the set from files or symlinks
respectively that do not exist on the executing host.
Use the -f, -F, or -L suboptions with the -a suboption to erase all
of a cfmdb file. The -F and -L suboptions are required for
non-existant regular files and symlinks respectively.
Note: An alternative to -a{f|F|L} is `rm <cfmdb_rcsfile>'.
Derald Metzger <dmetz@remotesensing.org>
Surely: 000210-dam. Just started
allfiles list of non-rpm config files put in the all set config misc cfm configuration params hostsets list of hosts and their sets list hsfiles list of host specific files put in each E<lt>hostE<gt> set
cfm-cmd-list
Derald Metzger 1998 - 2000. This program is distributed under the GPL.