diff options
author | 2001-11-07 16:02:51 +0000 | |
---|---|---|
committer | 2001-11-07 16:02:51 +0000 | |
commit | 588688bad5367bf36f86b6d209f6cf3fef82ee29 (patch) | |
tree | 89f6399f75d7d7f4a721479881630f78b358c3da | |
parent | more is no more. less has been used as more for more or less most of the (diff) | |
download | wireguard-openbsd-588688bad5367bf36f86b6d209f6cf3fef82ee29.tar.xz wireguard-openbsd-588688bad5367bf36f86b6d209f6cf3fef82ee29.zip |
Only mktemp /tmp/pbad.XXXXXXXXXX when we need it, otherwise we end
up with a turd in /tmp in the unused cases.
Add a sparc64 category now that gnats has one.
-rw-r--r-- | gnu/usr.bin/sendbug/sendbug.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gnu/usr.bin/sendbug/sendbug.sh b/gnu/usr.bin/sendbug/sendbug.sh index 36725f8974f..844143c2401 100644 --- a/gnu/usr.bin/sendbug/sendbug.sh +++ b/gnu/usr.bin/sendbug/sendbug.sh @@ -21,7 +21,7 @@ # along with GNU GNATS; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # -# $OpenBSD: sendbug.sh,v 1.11 1999/02/04 00:04:26 millert Exp $ +# $OpenBSD: sendbug.sh,v 1.12 2001/11/07 16:02:51 millert Exp $ # The version of this sendbug. VERSION=3.97 @@ -128,16 +128,11 @@ else fi fi -# Make temp files safely -TEMP=`mktemp $TMPDIR/p.XXXXXX` || exit 1 -BAD=`mktemp $TMPDIR/pbad.XXXXXX` || { +TEMP=`mktemp $TMPDIR/p.XXXXXXXXXX` || exit 1 +REF=`mktemp $TMPDIR/pf.XXXXXXXXXX` || { rm -f $TEMP exit 1 } -REF=`mktemp $TMPDIR/pf.XXXXXX` || { - rm -f $TEMP $BAD - exit 1 -} FROM="$LOGNAME" if [ -z "$REPLYTO" ]; then @@ -258,7 +253,7 @@ fi # echo "$COMMAND: could not read $DATADIR/gnats/$GNATS_SITE for categories list." # exit 1 #fi -CATEGORIES="system user library documentation ports kernel sparc i386 m68k mips ppc arm alpha ns32k vax" +CATEGORIES="system user library documentation ports kernel sparc i386 m68k mips ppc arm alpha ns32k vax sparc64" if [ -z "$CATEGORIES" ]; then echo "$COMMAND: the categories list for $GNATS_SITE was empty!" @@ -509,6 +504,7 @@ while [ -z "$REQUEST_ID" ]; do case "$input" in a*) if [ -z "$BATCH" ]; then + BAD=`mktemp $TMPDIR/pbad.XXXXXXXXXX` || exit 1 echo "$COMMAND: the problem report remains in $BAD and is not sent." mv $TEMP $BAD else @@ -553,6 +549,7 @@ if $MAIL_AGENT < $REF; then else echo "$COMMAND: mysterious mail failure." if [ -z "$BATCH" ]; then + BAD=`mktemp $TMPDIR/pbad.XXXXXXXXXX` || exit 1 echo "$COMMAND: the problem report remains in $BAD and is not sent." mv $REF $BAD else |