#!/bin/sh # Copyright for the Uniform Repository Service (c) 1997, # by Gerald Banon. All rights reserved. # Version 1.1 # mailsetting pid=$$ mkdir .t$pid ps -e >.t$pid/ax 2>.t$pid/bx if test ! -s .t$pid/bx then if test -s .t$pid/ax then PID=`cat .t$pid/ax | grep mailtool | awk '{ print $1 }'` if test -n "$PID" then kill -USR1 $PID 2>.t$pid/bx fi fi else ps -a >.t$pid/ax 2>.t$pid/bx if test ! -s .t$pid/bx then if test -s .t$pid/ax then PID=\ `cat .t$pid/ax | grep console | grep mailtool | awk '{ print $1 }'` if test -n "$PID" then kill -USR1 $PID 2>.t$pid/bx fi fi else echo "" echo 'mailsetting: proper ps command not found' echo "" fi fi # which mail to use ----------------------------------- cat >.t$pid/ax <.t$pid/header end_.t/ax chmod +x .t$pid/ax .t$pid/ax 2>.t$pid/bx if test -s .t$pid/bx then # mailx not found set `echo mail`; mail=$1 else # mailx found set `echo mailx`; mail=$1 fi # which mail to use ------------------------------- end rm -r .t$pid echo $mail