SCIENTIFIC-LINUX-USERS Archives

July 2009

SCIENTIFIC-LINUX-USERS@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:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Wed, 29 Jul 2009 18:47:08 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (48 lines)
On Wed, 29 Jul 2009, Konstantin Olchanski wrote:

> On Wed, Jul 29, 2009 at 08:41:52AM +0800, John Summerfield wrote:
>> Konstantin Olchanski wrote:
>>> On Tue, Jul 28, 2009 at 01:04:52PM -0500, Billy Crook wrote:
>>>> chmod -x /etc/cron.daily/yum.cron
>>>
>>> Are these kind of changes undone the next time this package is updated?
>>
>> I guess this would prevent its being undone:
>> chattr +i /etc/cron.daily/yum.cron
>
> Will this cause "yum update" to bomb, blocking any further updates?

The file /etc/cron.daily/yum.cron is marked in the rpm as a 'config' file 
but perhaps should be config(noreplace) to avoid the need for such 
hackery with chattr...

ie currently the specfile contains:

%files
%defattr(-, root, root)
%dir %{_sysconfdir}/yum.d/
%config %{_sysconfdir}/cron.daily/yum.cron
%config(noreplace) %{_sysconfdir}/yum.d/yum.cron.excludes
%config %{_sysconfdir}/init.d/yum
%{_sysconfdir}/yum.d/

although chkconfig'ing it off (and making sure that the 
/var/lock/subsys/yum isn't present) is easy enough, ie currently the 
script contains a check:

#******************************
#Start the program
#But only if we're supposed to
#******************************
if [ -f /var/lock/subsys/yum ]; then
...

so running:

   chkconfig --level 2345 yum off
   service yum stop

should make sure that the yum.cron never active...

  -- Jon

ATOM RSS1 RSS2