Once sysf has been fully set up, configuring a new host on the network
is a simple task. First one must add the new host-name in the hosts.conf
file. It must be added to the ALL list as well as to any other
host groups
the host should belong to. There is no need to modify the sysf.conf
file.
The next task is to create all the necessary config files. Most entry
will have a DEFAULT or HOST GROUP config file.
These files will usually be
appropriate and require no alteration, but should one host require a
specific system file one can make a copy of an existing config file
and customise it for the new host. SHARED files can be ignored.
sysf entries which have the h flag set are the ones for which a
specific config file must be created one way or another.
Most of them will be created during the installation of the operating system.
The Linux lilo.conf or the fstab files are typical examples.
Some of the host specific system files can easily be prepared before the
new host is installed.
The /etc/sysconfig/network file for example can be copied and
customised from an existing file. One would thus create the config file
prior to the installation of the new host.
Some other system files, especially those which depend very much on the
hardware like the fstab or the XF86Config files, are better
created during the installation of the operating system. Any further
customisation can be done
just after the installation. In particular, one should at least add to the
fstab file an NFS entry for the NFS partition on which the config directory resides. The directory must be mounted before sysf can be
used (though it can be mounted by hand too).
Once all the files have been prepared, the command
# sysf -OS_install ALL
will perform the appropriate operation to configure the new host. This
command will create or update the system and config file according
to the following rule:
If the config file exists, the sysf -first_install command is
executed, to make a copy of the system file with the .DIST
extension (if there is
none yet) and to copy the config file into the system file. If the
config file
does not exist, then if the sysf h flag is on for that entry, the
command sysf -new is executed to create the config file for the new
host.
If the sysf h flag is off the config file is created as a symbolic
link to the file NONE (which does not need to exist).
The configuration of a new hosts can be performed using a script file like the one below:
#!/bin/csh -f ## kenighan is the name of the main server rm -f /root/.tcshrc ln -s /root/.cshrc /root/.tcshrc echo 'set prompt="`uname -n`:# "' >> /root/.cshrc cat >> /etc/fstab << EOF # Home directory kernighan:/direct/home /home nfs defaults # Shared directories kernighan:/direct/RPMS /usr/local/RPMS nfs defaults kernighan:/direct/Common /usr/local/common nfs defaults kernighan:/direct/sys /usr/local/sys nfs defaults kernighan:/direct/mail /var/mail nfs actimeo=0 EOF mkdir /usr/local/RPMS mkdir /usr/local/common mkdir /usr/local/sys if ( ! -d /extra/tmp ) then mkdir /extra/tmp chmod 777 /extra/tmp endif # mount the NFS file systems mount -a # Get ntpd running echo "setting the clock!" /etc/rc.d/init.d/ntpd stop /usr/sbin/ntpdate kernighan /usr/sbin/setclock /etc/rc.d/init.d/ntpd start # Install extra packages and patches (cd /usr/local/RPMS/RedHat7.2/PowerTools; rpm -ivh *.rpm) (cd /usr/local/RPMS/RedHat7.2/Patches; rpm -ivh *.rpm) # Configure the hosts using sysf. echo "Install system files" /usr/local/sys/bin/sysf -OSI ALL