SCIENTIFIC-LINUX-DEVEL Archives

November 2013

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

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

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

Print Reply
Subject:
From:
Reply To:
Date:
Fri, 29 Nov 2013 11:23:17 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Hi everyone,


yum-autoupdate keeps sending emails even if nothing happened.

Relevant config settings:
SENDEMAIL="true"
SENDONLYERRORS="false"
DEBUG="false"

This behaviour is due to the yum invokation that has changed in 6rolling.

In 6.4 the relevant line is:

> /usr/bin/yum -c $TEMPCONFIGFILE -e 0 -d 1 -y $SECURITY update 2>&1 | cat > $TEMPFILE

In 6rolling we have this:

> YUMOUT="$(yum -c $TEMPCONFIGFILE -e 0 -d 1 -y $SECURITY $SKIP_BROKEN update 2>&1)"
> echo "$YUMOUT" > $TEMPFILE

which leads to a single newline character in $TEMPFILE even if there was 
no output from yum. Later, the script checks whether or not the 
$TEMPFILE size is greater than zero. That's where the mail comes from.

Suggestion: use

> echo -n "$YUMOUT" > $TEMPFILE


Kind regards,

Philippe

ATOM RSS1 RSS2