Change-Id: I973827ec916f65c5f8e7f2317c5b51a30ea88474
mylogfile="$logdir/zfs-replicate-all.log"
date=`date`
starttime=`date +%s`
-tmpfile=`tempfile`
+tmpfile=`mktemp`
# Make sure we aren't already running
SCRIPT_NAME=${0##*/}
-PROCESS_LIST=`tempfile`
+PROCESS_LIST=`mktemp`
ps -ef | grep -e "$SCRIPT_NAME" | grep -v grep | grep -v tail | grep -v less | grep -v $$ | grep -v $PPID >> $PROCESS_LIST
if [[ $? == 0 ]]; then
echo "$date Another $SCRIPT_NAME process is already running" >> $mylogfile