Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16300 Details for
Bug 11359
[NEW FEATURE] pkg_postinst/pkg_preinst ewarn/einfo logging
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for functions.sh implementing emergemail feature
functions.sh.patch (text/plain), 1.65 KB, created by
Owen Gunden
on 2003-08-18 23:38:09 UTC
(
hide
)
Description:
patch for functions.sh implementing emergemail feature
Filename:
MIME Type:
Creator:
Owen Gunden
Created:
2003-08-18 23:38:09 UTC
Size:
1.65 KB
patch
obsolete
>--- functions-old.sh 2003-08-18 21:49:35.000000000 -0400 >+++ functions.sh 2003-08-19 01:23:25.000000000 -0400 >@@ -121,6 +121,31 @@ > BRACKET=$'\e[34;01m' > fi > >+# void emergemail(char *severity, char *message) >+# >+# send mail to root with the given message (if possible) >+# severity is either "information" (for einfo), >+# "warning" (for ewarn), >+# or "error" (for eerror). >+# >+emergemail() { >+ SEVERITY=$1 >+ MESSAGE=$2 >+ if echo ${FEATURES} | grep -iq emergemail; then >+ if [ -x /usr/sbin/sendmail ]; then >+ echo -e "Subject: ${SEVERITY} from emerge of ${P}\n\n${MESSAGE}" \ >+ | /usr/sbin/sendmail root >+ else >+ # don't you dare try to use ewarn here :) >+ echo -e " ${WARN}*${NORMAL} the emergemail feature was unable to" >+ echo -e " ${WARN}*${NORMAL} find /usr/sbin/sendmail. You must have" >+ echo -e " ${WARN}*${NORMAL} a Mail Transfer Agent (MTA) such as" >+ echo -e " ${WARN}*${NORMAL} postfix, exim, ssmtp, etc. to use this" >+ echo -e " ${WARN}*${NORMAL} feature." >+ fi >+ fi >+} >+ > # void esyslog(char* priority, char* tag, char* message) > # > # use the system logger to log a message >@@ -153,6 +178,8 @@ > echo -e " ${GOOD}*${NORMAL} ${*}" > fi > >+ emergemail information "${*}" >+ > return 0 > } > >@@ -166,6 +193,8 @@ > echo -ne " ${GOOD}*${NORMAL} ${*}" > fi > >+ emergemail information "${*}" >+ > return 0 > } > >@@ -181,6 +210,8 @@ > echo -e " ${WARN}*${NORMAL} ${*}" > fi > >+ emergemail warning "${*}" >+ > # Log warnings to system log > esyslog "daemon.warning" "rc-scripts" "${*}" > >@@ -199,6 +230,8 @@ > echo -e " ${BAD}*${NORMAL} ${*}" > fi > >+ emergemail error "${*}" >+ > # Log errors to system log > esyslog "daemon.err" "rc-scripts" "${*}" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11359
:
6039
|
6046
|
16300
|
16341
|
25855
|
27224
|
27382
|
36713
|
36784
|
43541
|
65206