Description of problem: Script /etc/cron.daily/rhn-ssl-cert-check FAILs if more than one traceback mails are set in /etc/rhn/rhn.conf Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. In /etc/rhn/rhn.conf set more than one traceback e-mails. traceback_mail = root@localhost, abc 2. Execute: /etc/cron.daily/rhn-ssl-cert-check Actual results: sed: -e expression #2, char 81: extra characters after command Expected results: No output, no errors. Additional info:
The problem is that the code used for processing the output form $(spacewalk-cfg-get traceback_mail) is the same as in Sat[5.3|5.2] but there two main differences: 1. then the approach for obtaining traceback_mail list was different back then. 2. In 5.3 and 5.2 /bin/mail was used for sending the mail. In 5.4 is used sendmail. Proposed Fix: file: /etc/cron.daily/rhn-ssl-cert-check if [ -z "$ADMIN" ]; then #ADMIN=$(spacewalk-cfg-get traceback_mail) ADMIN=$( spacewalk-cfg-get traceback_mail | tr '\n' ',') # Remove the last comma ADMIN=${ADMIN/%,/} # Replace commas with spaces #ADMIN=${ADMIN//,/ } # Trim leading spaces shopt -s extglob ADMIN=${ADMIN/#+( )/} fi How the fix was tested: Sat 5.4.1 RHEL6 and RHEL5 In file: /etc/cron.daily/rhn-ssl-cert-check Set : EXPIRATION=${EXPIRATION:-10000} In file /etc/rhn/rhn.conf Set :traceback_mail = root@localhost, dyordano Execute: /etc/cron.daily/rhn-ssl-cert-check Result: Two mails received.
Would the following patch help? --- rhn-ssl-cert-check 2010-06-04 14:19:03.000000000 +0200 +++ rhn-ssl-cert-check.new 2012-02-15 09:55:24.000000000 +0100 @@ -33,11 +33,6 @@ if [ -z "$ADMIN" ]; then ADMIN=$(spacewalk-cfg-get traceback_mail) - # Replace commas with spaces - ADMIN=${ADMIN//,/ } - # Trim leading spaces - shopt -s extglob - ADMIN=${ADMIN/#+( )/} fi if [ -z "$ADMIN" ]; then
Fixed in Spacewalk master, 302f3073eec15286963a3b862519a84cb460af4a.
This issue is resolved with the release of RHN Satellite 5.5. As of September 20th 2012, RHN Satellite 5.5 has been generally available. Release Notes and other 5.5 documentation can be found here: https://access.redhat.com/knowledge/docs/Red_Hat_Network_Satellite/ The associated Errata for the 5.5 release are: 5.5 Satellite GA Errata - http://rhn.redhat.com/errata/RHEA-2012-1296.html 5.5 Upgrade Errata - http://rhn.redhat.com/errata/RHEA-2012-1298.html 5.5 RHN Proxy GA Errata - http://rhn.redhat.com/errata/RHEA-2012-1297.html 5.5 RHN Tools GA Errata - http://rhn.redhat.com/errata/RHEA-2012-1299.html Regards, Clifford - Engineering Manager, Satellite