Next Previous Contents

2. The sysf Command Syntax

The general syntax for sysf is as follow:

    sysf [PARAMETERS] [COMMAND] [HOSTS] [ENTRY_NAMES]

In the following, the parameters and command names are listed as -PARAMETER=X where PARAMETER is the parameter name and X is its short cut. So sysf -PARAMETER ... is equivalent to sysf -X ....

The PARAMETERS control certain aspect of sysf. The COMMAND specifies the action to be taken; one and only one command has to be specified. The HOSTS list specifies the host or the list of hosts on which the command must be executed. The ENTRY_NAMES list specifies the list of entries (entry names) for which the command must be executed.

2.1 PARAMETERS

The valid parameters are:

2.2 COMMAND

The sysf commands all have a verbose name (like install) and a short abbreviation (like I) . Every command that actually modifies the system or the config files have an upper case abbreviation. Most other commands have a lower case abbreviation but some have an upper case one. Both the command name and the abbreviation must be preceded by the character - .

2.3 HOSTS

The host on which the sysf command is executed is the default host. One can otherwise specify a host or a group of hosts on which to execute the command. The valid argument to build the hosts list are:

The HOST_LIST must be the name of a host or a coma separated list of hosts (with no spaces at all). One can also use and mix names of host groups, which are defined in the sysf.hosts file, and which stands for all the hosts listed in these groups.

The actual list is built as follow: every name on the -hosts value is taken as a host-name to add to the list unless it is the name of a host group which is then expanded as the list of all the host belonging to that group. The hosts name are made into a single list from which multiple entries are reduced to a single occurrence (the first one). Then the -exclude_hosts is parsed in the same way except that these hosts are removed from the first list. By default the -hosts argument is the current host while -exclude_hosts always contain the DEAD host group.

Hosts groups are defined in the sysf.hosts file in the config directory. Group names must start with an upper case letter while hosts names must always start with a lower case letter. The host group ALL should refer to all the known hosts. The host group DEAD is interpreted a list of hosts that are currently not working and that must be removed from any list of hosts, preventing sysf to wait for the remote connection to time out.

Assuming that the hosts.conf file is as follow

DEAD = gates;
WEB_SERVER = stallman pike;
LINUX = trovald cox stallman;
UNIX = kernigan ritchie pike;
DEPRECATED = gates guillotine chastity_belt;
ALL =  LINUX UNIX DEPRECATED;
here are some example that illustrate how the host list is built. We use the -list_arg_hosts to display the resulting host list except in the last example where we use -list_host_group.

    # sysf -lha -h ritchie
    ritchie
    # sysf -lha -h kernighan,ritchie
    kernighan ritchie
    # sysf -lha -h LINUX
    trovald cox stallman
    # sysf -lha -h ritchie,UNIX
    ritchie kernigan pike
    # sysf -lha -h ritchie,DEPRECATED -xh chastity_belt 
    ritchie guillotine
    # sysf -lha -h ALL -xh cox,WEB_SERVER,guillotine
    trovald kernigan ritchie chastity_belt
    # sysf -lha -h ALL -xh LINUX,WEB_SERVER
    kernigan ritchie guillotine chastity_belt
    # sysf -lha ALL
    trovald cox stallman kernigan ritchie pike guillotine chastity_belt
    # sysf -lhg ALL
    trovald cox stallman kernigan ritchie pike gates guillotine chastity_belt

2.4 ENTRY_NAMES

The sysf entries are listed in the sysf.conf file in the config directory and the entry names is the name in the first column. When no entry name is specified as a sysf argument an error message is displayed if the command being executed modifies a system or a config file (install, new , makedef, makeshared, makegroup, uninstall, first_install, OS_install,archive, install_mode, install_uid, install_gid, archive_mode, archive_uid, archive_gid). For the other, harmless, commands, it defaults to the name ALL which corresponds to all the config files. The entry names can also be the names of config groups (the second column in sysf.conf). In that case the name is replaced by the list of all the entries belonging to that config groups.

To determine the config file of a given host, sysf searches first for the file with the host-name extension. If there isn't one, sysf scans all the host groups to which the host belongs (in the same order as they appear in the hosts.conf file) and takes the first file found with the matching suffix. If this fails, the CONFIG_NAME.DEFAULT file is used, and if there isn't any, a warning message is displayed. The suffix SHARED is used for the sysf entries which have the s flag set. This is for files that are stored on a shared (NFS mounted) file system.

Assuming that the sysf.conf file is as follow

clock        =  etc     /etc/sysconfig/clock    clock;
inittab      =  etc     /etc/inittab            inittab;
lilo.conf    =  etc     /etc/lilo.conf          lilo.conf       h;
exports      =  filesys /etc/exports            exports         h;
fstab        =  filesys /etc/fstab              fstab           h;
smb.conf     =  filesys /etc/samba/smb.conf     smb.conf        h;

Here are some example:


Next Previous Contents