Listing 6: logok.ksh--Log okay for a condition
#!/bin/ksh
#===================================================
# "@(#)logok.ksh"
#
# This script is used to log an end of condition
# state. It should be run from the host which want
# to log the end of a condition.
#
# Parameters : (only one)
# arg1 : Name of the okay file (along with path)
# Contents of this file should be the message
#
# Author :
# Ravindra Nemlekar
#
#===================================================
if [ $# -ne 1 ] ; then
echo Usage: $0 OK_FILE_NAME
exit 1
fi
rsh loggerhost -l loguser mkdir -p \
hosts/$(hostname) >/dev/null 2>&1
rcp $1 loguser@loggerhost:hosts/$(hostname)/\
End.Condition.$(basename $1)
|