From: Alan J. Pippin Date: Thu, 18 May 2023 20:20:06 +0000 (-0600) Subject: Changed deprecated calls to tempfile to mktemp instead X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/images/static/git-favicon.png?a=commitdiff_plain;h=fff1f01ed31934ecb362f274b2fe3023c1ee0fa0;p=zfs-ubuntu%2F.git Changed deprecated calls to tempfile to mktemp instead Change-Id: I973827ec916f65c5f8e7f2317c5b51a30ea88474 --- diff --git a/zfs-replicate-all b/zfs-replicate-all index 5dde8b2..54f96eb 100755 --- a/zfs-replicate-all +++ b/zfs-replicate-all @@ -14,11 +14,11 @@ logfile="$logdir/zfs-replicate.log" 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