| Cross Updating | Release Notes | Doc Center | FAQ's | Manual |
This section of the guide gives you some of the other uses that modem links between sites can be used for. It also includes some details of more advanced features of cross-updating. We will not go into much detail. We would expect that if you can understand the notes then you will be able to implement the features. Otherwise, it is better to ignore this section. What we have provided are the hooks into the cross updating utilities, and how you use them is up to you. Due to the varying configurations currently being used we are unable to give support on these features. These notes assume a basic knowledge of shell scripts and Unix commands.
If the scripts: /usr/utilities/custom.snd or /usr/utilities/custom.chk are present, these will automatically be run by the x_send and x_check routines.
custom.snd will be run by x_send and custom.chk by x_check. These can be used to transfer other files automatically between systems. You must remember that you should only send files to the uucppublic directory, and use custom.chk to retrieve them. Otherwise the whole transfer may fail. You can make use of the shell variable stored in /etc/call_info if required.
You may want to utilise the laser printer at the main location for a bill run at the branch. You can add a remote printer (with scoadmin - printers) that will automatically prepare the document, send the print output to the main surgery and print it out automatically. When specifying the printer you should use the 'Remote' model and specify the site and the printer name AT THE REMOTE SITE you want it printed to.
Note: You will need to make a change to /usr/lib/uucp/Permissions on the remote site. This will let UUCP know that remote print jobs can be accepted. The change is to the COMMANDS entry, you should insert lp in addition to the existing commands e.g.MACHINE=bdsedin LOGNAME=uucp \ COMMANDS=lp:rmail:rnews:uucp \ READ=/ WRITE=/ \ SENDFILES=yes REQUEST=yesThis file can only be edited by 'root' and has to be done from the Operating System prompt.
Diary files are NOT transferred during the normal operation of cross updating. You can however create a script to handle this for you. We have included two sample scripts to outline the procedure.
This is the send_diary script. Any lines starting with a # are
treated as a comment and will be ignored by the system.
:
# Script to send a diary to remote site
# Read settings, only VETSYS concerns us at present.
. /etc/call_info
Diary=3 # Diary to process
# Copy files to /tmp and compress them
cp $VETSYS/v6nd??${Diary} /tmp && compress /tmp/v6nd??${Diary}
chmod 777 /tmp/v6nd??${Diary}.Z
# Set a flag to check the transfer worked
STATUS="FAILED"
#OK Send them to site branch and set 'status'
uucp -C /tmp/v6nd??${Diary}.Z site!/usr/spool/uucppublic && STATUS="OK"
# Clean up the /tmp directory
rm -f /tmp/v6nd??${Diary}.Z
# Create the lock file only if copy worked
[ $STATUS = "OK" ] && touch $VETSYS/LCK..D${Diary}
This is the script to get the diaries called get_diary.
:
# Read in the current settings. In this script we
# are only concerned with VETSYS which is where the
# Premvet software is located.
. /etc/call_info
Diary=3
if [ -f /usr/spool/uucppublic/v6nd??{Diary}.Z ] ; then
chmod 777 /usr/spool/uucppublic/v6nd??{Diary}.Z
# Get diary files (diary no {Diary}) and exit if not there
uncompress -f /usr/spool/uucppublic/v6nd??{Diary}.Z || exit
# Now copy them to the vet sys.
if cp /usr/spool/uucppublic/v6nd??{Diary} $VETSYS ; then
chmod +xrw $VETSYS/v6nd??{Diary}
rm -f /usr/spool/uucppublic/v6nd??{Diary} $VETSYS/LCK..D{Diary}
fi
fi
These scripts could be run from cron just before and after the surgery at the branch. While the branch surgery is running they will be able to make appointments and edit the diary as required. Meanwhile, the main site can read the diary but cannot edit any information.
This cron example:
50 12 * * 1-5 /usr/utilities/diary_snd 45 17 * * 1-5 /usr/utilities/diary_get
Shows that the diary is sent at 12:50 TO the branch, this will lock the diary at the main site stopping users from changing it. At 17:45 the diary is copied back into place and the lock removed.
Remember, while the lock file exists, users cannot edit the diary. It is advisable to lock the diary for the minimum time. If you are only using overnight transfers it is not advisable to transfer diaries.
If you wish routines to automate file transfer you can either use plain E-Mail (all machines know how to send e-mail between sites where in turn it can forward elsewhere) or via some uucp scripts.
This is an example of a basic scripts that can be expanded to handle the bulk of your needs.
# ---------- Cut Here -------------------- #!/bin/sh # @(#) Send one (or more) files via uucp to all cross updating sites. # This will use the entries SITES and PDSASEND from /etc/call_info # Add uucp flags and error trapping as required. # Make sure at least one file is specified otherwise display usage message if [ $# -lt 1 ] ; then echo "Usage: $0 name-of-file" ; exit 1 fi Iam=`uuname -l` # Who am I ? . /etc/call_info # Read in all the sites # loop and send to all the sites. for site in $SITES $PDSASEND do uucp $@ $site!~/extra/$Iam/ done # ---------- Cut Here --------------------
|
|
|