SCIENTIFIC-LINUX-DEVEL Archives

November 2013

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for Scientific Linux developers worldwide <[log in to unmask]>
Date:
Mon, 18 Nov 2013 17:56:10 +0100
Reply-To:
Elias Persson <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset="ISO-8859-1"; format=flowed
From:
Elias Persson <[log in to unmask]>
Parts/Attachments:
text/plain (46 lines)
Not really, given the use case (send mail with output in case of 
errors). Not sure why the cat is necessary, but if it really is, 
something like:

     {
         yum ...
         status=$?
     } 2>&1 | cat ...

should probably do.

On 2013-11-18 17:09, Paul Robert Marino wrote:
> the logger command may be a better choice than a static file.
>
>
> On Mon, Nov 18, 2013 at 9:19 AM, Pat Riehecky <[log in to unmask]> wrote:
>> Let me look into it.
>>
>> Pat
>>
>>
>> On 11/15/2013 07:19 PM, William Taylor wrote:
>>>
>>> In /etc/cron.daily/yum-autoupdate if yum exits with an error it will
>>> never be considered an
>>> error because cat will exit with no error. This results with errors not
>>> being processed and
>>> emails not going out. Can this be re-written to not rely on cat so this
>>> won't happen ?
>>>
>>> /usr/bin/yum -c $TEMPCONFIGFILE -e 0 -d 1 -y $SECURITY update 2>&1 | cat
>>>>
>>>> $TEMPFILE
>>>
>>>
>>> Thanks,
>>>    William
>>
>>
>>
>> --
>> Pat Riehecky
>>
>> Scientific Linux developer
>> http://www.scientificlinux.org/

ATOM RSS1 RSS2