From c83275d962841dac04faaec19df71b6baa618e88 Mon Sep 17 00:00:00 2001 From: zacheiss Date: Tue, 3 Apr 2007 15:36:01 +0000 Subject: [PATCH] Transfer file to a temporary filename and mv it into place if transfer was successful. --- gen/sapprint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gen/sapprint.sh b/gen/sapprint.sh index a32d6da8..6fdf353b 100755 --- a/gen/sapprint.sh +++ b/gen/sapprint.sh @@ -12,7 +12,8 @@ fi MR_MISSINGFILE=47836473 PATH=/bin -OUTFILE=/var/tmp/sapprint.out +OUTFILE=/var/tmp/sapprint.out.moira +DSTFILE=/var/tmp/sapprint.out # Alert if the output file doesn't exist test -r $OUTFILE || exit $MR_MISSINGFILE @@ -22,6 +23,9 @@ chown root $OUTFILE chgrp 0 $OUTFILE chmod 644 $OUTFILE +# mv file into place. +mv $OUTFILE $DSTFILE + # cleanup test -f $0 && rm -f $0 -- 2.45.2