|
Lines 87-105
Link Here
|
| 87 |
REPLY_TO="${REPLY_TO:-${REPLYTO:-$LOGNAME}}" |
87 |
REPLY_TO="${REPLY_TO:-${REPLYTO:-$LOGNAME}}" |
| 88 |
|
88 |
|
| 89 |
# Find out the name of the originator of this PR. |
89 |
# Find out the name of the originator of this PR. |
| 90 |
if [ -n "$NAME" ]; then |
90 |
if [ -z "$PR_ORIGINATOR" ]; then |
| 91 |
ORIGINATOR="$NAME" |
91 |
if [ -n "$NAME" ]; then |
| 92 |
elif [ -f $HOME/.fullname ]; then |
92 |
ORIGINATOR="$NAME" |
| 93 |
ORIGINATOR="`sed -e '1q' $HOME/.fullname`" |
93 |
elif [ -f $HOME/.fullname ]; then |
| 94 |
elif [ -f /bin/domainname ]; then |
94 |
ORIGINATOR="`sed -e '1q' $HOME/.fullname`" |
| 95 |
if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then |
95 |
elif [ -f /bin/domainname ]; then |
| 96 |
# Must use temp file due to incompatibilities in quoting behavior |
96 |
if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then |
| 97 |
# and to protect shell metacharacters in the expansion of $LOGNAME |
97 |
# Must use temp file due to incompatibilities in quoting behavior |
| 98 |
/usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" | |
98 |
# and to protect shell metacharacters in the expansion of $LOGNAME |
| 99 |
cut -f5 -d':' | sed -e 's/,.*//' > $TEMP |
99 |
/usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" | |
| 100 |
ORIGINATOR="`cat $TEMP`" |
100 |
cut -f5 -d':' | sed -e 's/,.*//' > $TEMP |
| 101 |
rm -f $TEMP |
101 |
ORIGINATOR="`cat $TEMP`" |
|
|
102 |
rm -f $TEMP |
| 103 |
fi |
| 102 |
fi |
104 |
fi |
|
|
105 |
else |
| 106 |
ORIGINATOR="$PR_ORIGINATOR" |
| 103 |
fi |
107 |
fi |
| 104 |
|
108 |
|
| 105 |
if [ "$ORIGINATOR" = "" ]; then |
109 |
if [ "$ORIGINATOR" = "" ]; then |
|
Lines 108-123
Link Here
|
| 108 |
rm -f $TEMP |
112 |
rm -f $TEMP |
| 109 |
fi |
113 |
fi |
| 110 |
|
114 |
|
| 111 |
if [ -n "$ORGANIZATION" ]; then |
115 |
if [ -z "$PR_ORGANIZATION" ]; then |
| 112 |
if [ -f "$ORGANIZATION" ]; then |
116 |
if [ -n "$ORGANIZATION" ]; then |
| 113 |
ORGANIZATION="`cat $ORGANIZATION`" |
117 |
if [ -f "$ORGANIZATION" ]; then |
|
|
118 |
ORGANIZATION="`cat $ORGANIZATION`" |
| 119 |
fi |
| 120 |
else |
| 121 |
if [ -n "$DEFAULT_ORGANIZATION" ]; then |
| 122 |
ORGANIZATION="$DEFAULT_ORGANIZATION" |
| 123 |
elif [ -f $HOME/.organization ]; then |
| 124 |
ORGANIZATION="`cat $HOME/.organization`" |
| 125 |
fi |
| 114 |
fi |
126 |
fi |
| 115 |
else |
127 |
else |
| 116 |
if [ -n "$DEFAULT_ORGANIZATION" ]; then |
128 |
$ORGANIZATION="$PR_ORGANIZATION" |
| 117 |
ORGANIZATION="$DEFAULT_ORGANIZATION" |
|
|
| 118 |
elif [ -f $HOME/.organization ]; then |
| 119 |
ORGANIZATION="`cat $HOME/.organization`" |
| 120 |
fi |
| 121 |
fi |
129 |
fi |
| 122 |
|
130 |
|
| 123 |
# If they don't have a preferred editor set, then use |
131 |
# If they don't have a preferred editor set, then use |
|
Lines 139-145
Link Here
|
| 139 |
|
147 |
|
| 140 |
COMMAND=`echo $0 | sed -e 's,.*/,,'` |
148 |
COMMAND=`echo $0 | sed -e 's,.*/,,'` |
| 141 |
USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--request-id] |
149 |
USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--request-id] |
| 142 |
[--version]" |
150 |
[--version] [-a file]" |
| 143 |
REMOVE= |
151 |
REMOVE= |
| 144 |
BATCH= |
152 |
BATCH= |
| 145 |
|
153 |
|
|
Lines 162-167
Link Here
|
| 162 |
-L | --list) FORMAT=norm ;; |
170 |
-L | --list) FORMAT=norm ;; |
| 163 |
-l | -CL | --lisp) FORMAT=lisp ;; |
171 |
-l | -CL | --lisp) FORMAT=lisp ;; |
| 164 |
--request-id) REQUEST_ID=true ;; |
172 |
--request-id) REQUEST_ID=true ;; |
|
|
173 |
-a | --attach) if [ -z "$2" ]; then |
| 174 |
echo "$USAGE" ; exit 1; |
| 175 |
fi |
| 176 |
if [ ! -d "$2" ]; then |
| 177 |
if file $2 | grep "text" >/dev/null 2>/dev/null ; then |
| 178 |
ATTACHED_FILES="$ATTACHED_FILES |
| 179 |
--- $2 begins here --- |
| 180 |
`cat \"$2\"` |
| 181 |
--- $2 ends here --- |
| 182 |
" |
| 183 |
else |
| 184 |
ATTACHED_FILES="$ATTACHED_FILES |
| 185 |
`uuencode \"$2\" < \"$2\"` |
| 186 |
" |
| 187 |
fi |
| 188 |
shift; |
| 189 |
fi; |
| 190 |
;; |
| 165 |
-h | --help) echo "$USAGE"; exit 0 ;; |
191 |
-h | --help) echo "$USAGE"; exit 0 ;; |
| 166 |
-V | --version) echo "$VERSION"; exit 0 ;; |
192 |
-V | --version) echo "$VERSION"; exit 0 ;; |
| 167 |
-*) echo "$USAGE" ; exit 1 ;; |
193 |
-*) echo "$USAGE" ; exit 1 ;; |
|
Lines 318-324
Link Here
|
| 318 |
END { printf "\nSEND-PR:\n"; }' >> $file |
344 |
END { printf "\nSEND-PR:\n"; }' >> $file |
| 319 |
|
345 |
|
| 320 |
|
346 |
|
| 321 |
|
|
|
| 322 |
cat >> $file << __EOF__ |
347 |
cat >> $file << __EOF__ |
| 323 |
To: $GNATS_ADDR |
348 |
To: $GNATS_ADDR |
| 324 |
Subject: |
349 |
Subject: |
|
Lines 330-357
Link Here
|
| 330 |
>Submitter-Id: $SUBMITTER |
355 |
>Submitter-Id: $SUBMITTER |
| 331 |
>Originator: $ORIGINATOR |
356 |
>Originator: $ORIGINATOR |
| 332 |
>Organization: ${ORGANIZATION-$ORGANIZATION_C} |
357 |
>Organization: ${ORGANIZATION-$ORGANIZATION_C} |
| 333 |
>Confidential: $CONFIDENTIAL_C |
358 |
>Confidential: ${PR_CONFIDENTAL-$CONFIDENTIAL_C} |
| 334 |
>Synopsis: $SYNOPSIS_C |
359 |
>Synopsis: ${PR_SYNOPSIS-$SYNOPSIS_C} |
| 335 |
>Severity: $SEVERITY_C |
360 |
>Severity: ${PR_SEVERITY-$SEVERITY_C} |
| 336 |
>Priority: $PRIORITY_C |
361 |
>Priority: ${PR_PRIORITY-$PRIORITY_C} |
| 337 |
>Category: $CATEGORY_C |
362 |
>Category: ${PR_CATEGORY-$CATEGORY_C} |
| 338 |
>Release: ${DEFAULT_RELEASE-$RELEASE_C} |
363 |
>Release: ${DEFAULT_RELEASE-$RELEASE_C} |
| 339 |
>Class: $CLASS_C |
364 |
>Class: $CLASS_C |
| 340 |
>Environment: |
365 |
>Environment: |
| 341 |
|
366 |
|
| 342 |
$ENVIRONMENT_C |
367 |
${PR_ENVIROMENT- $ENVIRONMENT_C} |
| 343 |
|
368 |
|
| 344 |
>Description: |
369 |
>Description: |
| 345 |
|
370 |
|
| 346 |
$DESCRIPTION_C |
371 |
${PR_DESCRIPTION- $DESCRIPTION_C} |
| 347 |
|
372 |
|
| 348 |
>How-To-Repeat: |
373 |
>How-To-Repeat: |
| 349 |
|
374 |
|
| 350 |
$HOW_TO_REPEAT_C |
375 |
${PR_HOW_TO_REPEAT- $HOW_TO_REPEAT_C} |
| 351 |
|
376 |
|
| 352 |
>Fix: |
377 |
>Fix: |
| 353 |
|
378 |
|
| 354 |
$FIX_C |
379 |
${PR_FIX- $FIX_C} |
|
|
380 |
$ATTACHED_FILES |
| 355 |
|
381 |
|
| 356 |
__EOF__ |
382 |
__EOF__ |