1#!/bin/sh - 2# 3# Copyright (c) 1983 Regents of the University of California. 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms are permitted 7# provided that the above copyright notice and this paragraph are 8# duplicated in all such forms and that any documentation, 9# advertising materials, and other materials related to such 10# distribution and use acknowledge that the software was developed 11# by the University of California, Berkeley. The name of the 12# University may not be used to endorse or promote products derived 13# from this software without specific prior written permission. 14# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17# 18# @(#)sendbug.sh 5.9 (Berkeley) 05/11/89 19# 20# Create a bug report and mail to '4bsd-bugs'. 21 22PATH=/bin:/sbin:/usr/sbin:/usr/bin 23export PATH 24 25TEMP=/tmp/bug$$ 26FORMAT=/usr/share/misc/bugformat 27 28# uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path. 29: ${BUGADDR=4bsd-bugs@BERKELEY.EDU} 30: ${EDITOR=vi} 31 32trap 'rm -f $TEMP ; exit 1' 1 2 3 13 15 33 34cp $FORMAT $TEMP 35if $EDITOR $TEMP 36then 37 if cmp -s $FORMAT $TEMP 38 then 39 echo "File not changed, no bug report submitted." 40 exit 41 fi 42 case "$#" in 43 0) sendmail -t -oi $BUGADDR < $TEMP ;; 44 *) sendmail -t -oi "$@" < $TEMP ;; 45 esac 46fi 47 48rm -f $TEMP 49