                   Migration Guide

This guide explains how you can integrate and customize MAT for
your sites needs.  It outlines the location of the files within 
the MAT installation directory MATHOME.  A brief discussion of
how to integrate MAT into your DNS, NIS, and NFS servers is
included.

1. Directory structure of the Agent and Console
The Agent has the following directory structure:

MATHOME ---> bin  - Contains the agent binary.  
         |
         |-> etc  ---  Contains the files which MAT edits such
         |         |   as passwd, group, hosts, etc
         |         |
         |         |-> MATdefaults  - Contains any site specific
         |         |                  configuration files which
         |         |                  a new users account should 
         |         |                  contain such as: .login,
         |         |                  .profile, .zshrc, etc
         |         |
         |         |-> nis  - Contains all the NIS files that MAT
         |         |          can manage.  See the scripts file
         |         |          for site specific configurations.
         |         |
         |         -> named  - Contains all the DNS records for
         |                     a DNS server on this specific host.
         |
         |-> var  ---  Contains the log file for the MAT agent.
         |         |   It contains the MATd monitored parameter
         |         |   statistics.
         |         |
         |         -> tape  - Contains catalog information for
         |                    all tape volumes made on a tape 
         |                    archive server.  Not ready for
         |                    release yet.
         |
         --> scripts  - Contains the site specific scripts used
                        to add custom functions.


The Console does not have to be installed in the same MATHOME
directory as the agent.  It only needs to be installed on one host 
on a network.  It's directory structure is as follows:
MATHOME ---> bin  - Contains the MAT console Tcl/TK code.  You
         |          may need to edit the "mat" file to set the
         |          path of the Tcl/TK interperator wish.  
         |
         |-> lib  - Contains the gif's used by MAT as well as
         |          the tcl function lib's.
         |
         --> agent  - Contains self upgrade packages for the
                      agent.  The console sends these to the
                      agent to update an agent on a remote 
                      machine.


2. Migration of common configuration files.

2.1 Migration of common config files:
Starting from version 0.17 the following files will require
no alterations to be used directly with MAT:
	/etc/aliases
	/etc/group
	/etc/hosts
	/etc/named.boot
	/etc/passwd
	/etc/resolv.conf
	/etc/shadow
	/etc/services
	/etc/syslogd.conf
	/etc/fstab 
	/etc/vfstab
	crontab
All others will require a symbolic link from the MAT file in
$MATHOME/etc/whatever to the configuration file.  This 
can be done for the following files:
	/etc/motd (or /etc/issue)

Simply cd to the etc directory any type:
	ln -s /var/mat/etc/motd motd


2.2 NIS Migration
NIS migration is relatively simple.  Make a symbolic link from
the NIS source directory to $MATHOME/etc/nis.  A $MATHOME/etc/nis
directory will exist by default, but it is empty.
In addition to this there are several scripts
in the agents scripts directory that have to be modified.
NOTE:  The netgroup parsing is very simple.  It does not yet
understand lines seperated with a "\", or the "+" directive.

nisAddUser - This script is called after a user has been added
             to the NIS password file, and a home directory 
             has been made.  This is useful for adding accounting
	     or quota information for a user.

nisModUser - This scripts is called after a users password entry
             has changed.  MAT can change all aspects of the 
             password file.  It will try to change ownership, 
             group, or location of home directory files, if 
             requested.  If a move of home directory location
             is requested it will not delete the users old
             directory.  This script could be used for this

nisDelUser - This scripts is called after a users password has
             been removed.  MAT does NOT delete users home dir-
             ectories.  This script could be modified to delete
             the users files, and any accounting, quota 
             information pertaining to the user.

nisYPMake  - This script calls the script to push out the 
             updated NIS maps to slave servers.  You will need
             to edit this script to tell it what to run to 
             update the NIS maps


2.3 NFS Migration
The MAT agent is configured to modify the export or dfstab
file directly.  No symbolic link is necessary.  However upon
changing the exports, or dfstab file the MAT agent will call a 
script to update the nfsd's.  The following scripts have to be
modified.

nfsAddExport - This script is called after a new export or share
               is added to the export, or dfstab file.  It should 
               run "exportfs -a -v", or "share ....".

nfsDelExport - This script is called when an export or share is
               removed.  It should run "exportfs -a -v", or 
               "share ....".

nfsModExport - This script is called when an export or share is
               modified.  It should run "exportfs -a -v", or 
               "unshare ... ;share ....".


2.4 DNS Migration
DNS migration requires a few steps to convert an existing domain.
The first step is to create a symbolic link from /etc/named.boot 
to $MATHOME/etc/named.boot, where $MATHOME is the installation 
directory of the MAT agent.  If this is a new domain you are 
done.  MAT is now ready to create a new DNS domain for you.  If
this is an existing domain, start by backing-up the named.boot
file, and the DNS records, and then use the following procedure:

  1. Use the DNS tool and select "New Domain".  Fill out all 
     the fields, and add the IP's of all the networks comprising 
     the domain.  Click the add button.

  2. The MAT agent will create a variety of files in the 
     $MATHOME/etc/named directory.  The files of interest are:
     db.domainname  - This is the SOA record for the DNS host
                      records.
     dbinc.domainname  - This is the file which contains the
                      actual host data for the domain.  You 
                      can take your host record, remove the 
                      SOA, and put it in place of this file.
                      The MAT DNS parser is simple, so keep
                      CNAMES immediately after the hosts A
                      record.  If in doubt create a few hosts
                      and look at the resulting file.
    db.netIP(_)     - This is the SOA record for the rev zone
                      file for just this network.  There
                      will be one of these files for EVERY 
                      network within the domain.
    dbinc.netIP(_)  - This is the rev zone file for one of 
                      the networks comprising a domain.  There
                      will be one of these for every network 
                      in comprising a domain.  You will need
                      to edit these files to insert your 
                      domains rev-zone files.  The format is 
                      very simple, and conversion should be
                      straight-forward. 
                       
The $MATHOME/scripts directory contains a script for sending a
HUP signal to the named daemon, DNSNamedHUP.  The script should 
work as-is.  If no named daemon is running it will attempt to 
start one. 
