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 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 CONFIGInstall the configuration file. The configuration file overwrites the system file.
first_install
sysf -first_install CONFIG sysf -FI CONFIGDoes 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 CONFIGThis 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 CONFIGArchive 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 CONFIGCreate 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 CONFIGCreate 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 CONFIGCreate 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 CONFIGCreate 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 CONFIGExecute 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 CONFIGDisplay 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 CONFIGChecks 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 CONFIGLists 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 CONFIGLists 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 CONFIGList 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 CONFIGList 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 CONFIGDisplays the config file on the screen using the
cat
command.
catsys
sysf -catsys CONFIG sysf -Cs CONFIGDisplays the system file on the screen using the
cat
command.
list_groups
sysf -list_groups sysf -lgList all the config groups.
list_configs
sysf -list_configs sysf -lcLists all the config files by config groups.
list_1group
sysf -list_1group GROUP sysf -l1g GROUPLists all the config files belonging to that groups.
list_hosts
sysf -list_hosts sysf -lhLists the host groups with their members.
list_hosts_group
sysf -list_hosts_group HOST_GROUP sysf -lhg HOST_GROUPLists 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" endThis 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.