Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to know how to stop the system from rebooting after running a yum update.

I use a script on each system which runs daily yum updates through cron and if an uodate is critical enough (for example a new kernel version) it will check whether any users are logged in and whether some specific software is running which should postpone a reboot. If this is not the case it will schedule a reboot.

However this does not appear to work very well (anymore). The system will reboot regardless, after a few minutes when a yum update ran by hand or by my script has finished. I need to know which mechanism is used to schedule this reboot and how to control it. There are many systems, such as those running simulations for weeks, that I prefer not to have rebooted. For those systems propagating a critical kernel fix is less important than keeping it up and running. I tried to find information but was unable to yet.

I did check the cronjobs as one of the first possible causes but was unable to find anything suspect. In addition when the uodate script's cronjob is enabled and I run yum update by hand the system will still reboot after a few minutes when the update has finished. Yum also does not appear some custom installed "warapper" script.

Edit: Problem was that even though the cronjob to run updates was disabled by me the package which contains the script and cronjob entry was updated as well, as a result it would reinstall the cronjob and cause the script to run and a reboot to occur. Fixing the script...

share|improve this question
4  
You use "a" script? What script do you use? –  Michael Hampton Mar 5 at 19:36
6  
A basic yum update does not reboot the system. You need to troubleshoot that script you are referring to in your question. You can Pastebin it and we'll have a look. –  Aaron Copley Mar 5 at 19:45
    
When I disable the script and run "yum update" by hand it will still reboot after a few minutes. –  aseq Mar 5 at 20:00
    
Are you using yum-cron? –  ALex_hha Mar 5 at 20:18
    
No it's not installed on our systems by default neither on the systems I am using to test. –  aseq Mar 5 at 21:15

1 Answer 1

up vote 6 down vote accepted

This is behavior that your organization has added - it's not behavior controlled by packaged scripts. Your best bet in finding out what causes the reboots is by asking within your organization. Those of us outside your organization can be of only marginal help.

Having said that, I would start by checking the scripts in /etc/cron.daily/, /etc/cron.d/ and any old-style cron jobs (crontab -l).

share|improve this answer
    
No cronjobs which would cause this behaviour, unfortunately. I checked that as one of the first suspects. –  aseq Mar 5 at 20:03
1  
Based on your comment above, there is some sort of job, be it cron or a cron-like facility, that is causing the reboots. It is very much specific to your environment, and if there's nothing in any cron directories that can account for it, you'll really need to get the information on what causes it from your organization internally. –  John Mar 5 at 20:07
    
Yes I agree it sounds not like a yum "feature" and it could explain why I can't find any information about it. But I think I read that an rpm package can trigger a reboot, maybe one of our custom packages does it. Any standard redhat packages wouldn't do that I would think? –  aseq Mar 5 at 20:12
1  
A package can trigger a reboot, but only when it is installed or upgraded, not by simply being on a system. There is a cron job, or a job in a cron-like facility, that is causing the reboots. Seriously, check around in your organization - someone there knows what is causing it and how to stop it. –  John Mar 5 at 20:27
1  
@aseq The kernel packages will not actually reboot the system - more likely you have something comparing the kernel's running version to the installed version and rebooting if they differ. You'll need to be the one to dig into what custom stuff is added on your servers in addition to the stock operating system that would be causing this. –  Shane Madden Mar 5 at 21:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.