1

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...

aseq
  • 4,610
  • 1
  • 24
  • 48

1 Answers1

6

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).

John
  • 9,070
  • 1
  • 29
  • 34
  • No cronjobs which would cause this behaviour, unfortunately. I checked that as one of the first suspects. – aseq Mar 05 '14 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 05 '14 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 05 '14 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 05 '14 at 20:27
  • In this update many packages get upgraded, it's a large upgrade, about 3 or so minor versions (rh6). How would I find out which package would trigger a reboot? I suspect the kernel package though. – aseq Mar 05 '14 at 21:18
  • 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 05 '14 at 21:55
  • 2
    Ok got it figured out. Even though I disabled and even removed the cron job the package containing the scripts and cronjob entry was updated as well, installing the disabled or removed cronjob and thus activating it again. The conjob was then run after a little while causing the reboot. Will now change that damn script. – aseq Mar 06 '14 at 02:16