PASSWD="cat /etc/passwd"
if [ -f /usr/lib/sendmail ] ; then
- RMAIL="/usr/lib/sendmail -oi -t"
+ MAIL_AGENT="/usr/lib/sendmail -oi -t"
elif [ -f /usr/sbin/sendmail ] ; then
- RMAIL="/usr/sbin/sendmail -oi -t"
+ MAIL_AGENT="/usr/sbin/sendmail -oi -t"
else
- RMAIL=rmail
+ MAIL_AGENT=rmail
fi
# Figure out how to echo a string without a trailing newline
MACHINE=`[ -f /bin/machine ] && /bin/machine`
ORGANIZATION_C='<organization of PR author (multiple lines)>'
-CONFIDENTIAL_C='<[ yes | no ] (one line)>'
SYNOPSIS_C='<synopsis of the problem (one line)>'
SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
PRIORITY_C='<[ low | medium | high ] (one line)>'
To: ${BUGADDR}
Subject: [50 character or so descriptive subject here (for reference)]
->Submitter-Id: <submitter ID>
+>Submitter-Id: net
>Originator: ${ORIGINATOR}
>Organization:
${ORGANIZATION- $ORGANIZATION_C}
->Confidential: $CONFIDENTIAL_C
+>Confidential: no
>Synopsis: $SYNOPSIS_C
>Severity: $SEVERITY_C
>Priority: $PRIORITY_C
>Class: $CLASS_C
>Release: libc-${VERSION}
>Environment:
- <machine, os, target, libraries (multiple lines)>
+ $ENVIRONMENT_C
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
/$PATTERN/{
s|||
s|<.*>||
-s|^[ ]*||
-s|[ ]*$||
+s|^[ ]*||
+s|[ ]*$||
p
q
}'
while :; do
CNT=0
- # 1) Confidential
#
- PATTERN=">Confidential:"
- CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
- case "$CONFIDENTIAL" in
- ""|yes|no) CNT=`expr $CNT + 1` ;;
- *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;;
- esac
- #
- # 2) Severity
+ # 1) Severity
#
PATTERN=">Severity:"
SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
*) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
esac
#
- # 3) Priority
+ # 2) Priority
#
PATTERN=">Priority:"
PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
*) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
esac
#
- # 4) Class
+ # 3) Class
#
PATTERN=">Class:"
CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
esac
- [ $CNT -lt 5 ] &&
+ [ $CNT -lt 3 ] &&
echo "Errors were found with the problem report."
while :; do
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
-" $TEMP > $REF
+" $TEMP > $TEMP.x
-if $MAIL_AGENT < $REF; then
+if $MAIL_AGENT < $TEMP.x; then
echo "$COMMAND: problem report sent"
xs=0; exit
else