COMMANDThe 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 command
have a lower case abbreviation but some have an upper case one. Both the
command name and the abbreviation must be preceded with the - character.
install
sysf -install CONFIG
sysf -I CONFIG
Install the configuration file. The configuration file overwrites the
system file.
first_install
sysf -first_install CONFIG
sysf -FI CONFIG
Does the same as -install except that before the system file is
overwritten by the config file, sysf makes a backup copy of the system
file in the same directory using the same name but with the .DIST
extension added to it. The backup copy is created only if it does
not exist, making sure the distribution version of the file is always
available.
OS_install
sysf -OS_install CONFIG
sysf -OSI CONFIG
This command is intended to perform the initialisation of a new host.
All SHARED files are ignored.
If the config file exists the system file is installed using the
first_install command.
If the config file does not exist nothing is done unless the sysf
entry has the h flag set. In that case the config file is created
using the new command.
archive
sysf -archive CONFIG
sysf -A CONFIG
Archive the system file. The configuration file is overwritten by system file.
If the configuration does not exist, if it is a host group, a DEFAULT
file or a SHARRED file an error message is displayed. One has to use the
-new, -makedef or -makeshared flag instead.
new
sysf -new CONFIG
sysf -N CONFIG
Create a new configuration file (CONFIG.HOST) for the specified
CONFIG name. This is used when there is no config file or when one wants
to use a host specific file, rather than a group or DEFAULT one for
this CONFIG entry. The archive command must be used to update the
host specific config file once it exists.
makedef
sysf -makedef CONFIG
sysf -MD CONFIG
Create or update the default configuration file (CONFIG.DEFAULT) for the
specified CONFIG name. This copies the system file into the DEFAULT
config file. After doing this one should update the system files on all the
hosts that use the DEFAULT config file.
makeshared
sysf -makeshared CONFIG
sysf -MS CONFIG
Create or update the shared configuration file (CONFIG.SHARED) for the
specified CONFIG name. This copies the system file into the SHARED
config file. There is no further update required as the file is shared by all
computers.
makegroup
sysf -makegroup HOST_GROUP CONFIG
sysf -MG CONFIG
Create or update the default configuration file for the specified host group
(CONFIG.HOST_GROUP) for the specified CONFIG name. This copies the
system file into the HOST_GROUP config file. After doing this one should
update the system files on all the hosts belonging to that host group.
uninstall
sysf -uninstall CONFIG
sysf -U CONFIG
Execute the BIN/CONFIG_NAME auxiliary command (if it exists) with the
-Remove flag. Typically this will remove auxiliary files or symbolic
links as in the rc directory. sysf does not do anything itself.
info
sysf -info CONFIG
sysf -i CONFIG
Display some information about the config entry including the last modification
date, the size and full pathname of both the config file and the system file.
It also tells if the configuration files and the system file are identical
and which one of the two was modified last.
check
sysf -check CONFIG
sysf -c CONFIG
Checks that the configuration file and the system file are identical.
Nothing is displayed unless the two file differ. This is typically used
to check groups of config files and email the result using the MailTo
parameter. If the system file does not exist, nothing is displayed, unless
the echo option is turned on. One should do this from time to time to ensure
that none of the super users have changed the system file without updating
the corresponding config file. The diff command can be used to check how
the files have been modified.
is_not_conf
sysf -is_not_conf CONFIG
sysf -nc CONFIG
Lists all the sysf entries with either no system or no config files.
If neither the config file nor the system file exists, nothing is displayed as
it is fair to assume this is intentional. This command is used to check the
consistency of the entries defined in the sysf.conf file.
diff
sysf -diff CONFIG
sysf -d CONFIG
Lists the differences between the system file and the configuration file using
the diff command. If after checking the consistency between the config
files and the system files it appears that there are differences, one can use
this command to list what the differences are.
check_host
sysf -check_host HOST CONFIG -h HOST2
sysf -dh CONFIG
List the config files which differ between HOST and HOST2. The sysf
entries with the flag h and s set are ignored and produce no output.
If a config file does not exist for neither hosts, then this is displayed
only if echo is on. This sysf command is used to list the differences
between two hosts, setting aside the files that are shared (s flag)
or specifically host dependent (h flag). Notice that it is the config
files that are compared, not the system files.
diff_host
sysf -diff_host HOST CONFIG -h HOST2
sysf -dh CONFIG
List the differences between the configuration files for HOST and HOST2 using
the diff command. The sysf entries with the flag s set are
ignored and produce no output. If a config file does not exist for neither
hosts, then this is displayed only if echo is on. This sysf command is
used to list the differences between two hosts. Notice that, unlike the
-check_host command, the entries with the h flag set can be
compared. While -check_host is used to list the files that differ between
two hosts, this command is used to check what the differences actually are.
cat
sysf -cat CONFIG
sysf -C CONFIG
Displays the config file on the screen using the cat command.
catsys
sysf -catsys CONFIG
sysf -Cs CONFIG
Displays the system file on the screen using the cat command.
list_groups
sysf -list_groups
sysf -lg
List all the config groups.
list_configs
sysf -list_configs
sysf -lc
Lists all the config files by config groups.
list_1group
sysf -list_1group GROUP
sysf -l1g GROUP
Lists all the config files belonging to that groups.
list_hosts
sysf -list_hosts
sysf -lh
Lists the host groups with their members.
list_hosts_group
sysf -list_hosts_group HOST_GROUP
sysf -lhg HOST_GROUP
Lists all the hosts belonging to that groups. The list can be used inside a
shell foreach loop to scan a list of hosts:
foreach host (`sysf -lhg ALL`)
rsh $host "df -k"
end
This is used by the oeh command to execute a shell command on a list of
hosts.
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.
Groups are defined in the sysf.hosts file in the config directory.
Group names must start with a Capital letter. The group name ALL
should refer to all the known hosts.
For example sysf -h ritchie selects the host ritchie while
sysf -h Sol2 selects the list of hosts members of the Sol2 group.
Multiple hosts can be entered in a coma separated list (which must not contain
any space). So sysf COM -h kernighan,ritchie,pike executes the
command COM on kernighan, ritchie and pike.
CONFIGS
The configuration names are listed in the sysf.conf file in the
Config directory. At least one config file must be specified. They can
also be specified by group (the second column in sysf.conf). The
name ALL corresponds to all the config files.