when to reboot?

pixel

Renowned Member
Aug 6, 2014
138
3
83
on ubuntu, i just look for /var/run/reboot-required.

just did an update on proxmox machines, and saw that the kernel was updated. but theres no /var/run/reboot-required. is there another file to look for?
 
AFAIK debian does not have this mechanism.

A reboot is required simply after a kernel upgrade
 
needed an automated check. using this for now.

Code:
[ `ls -tr /boot/initrd* | tail -1 | cut -d '-' -f 2-` != `uname -r` ]

for ansible users:

Code:
- hosts: proxmox
  tasks:
  - name: check for reboot
    shell:  "[ `ls -tr /boot/initrd* | tail -1 | cut -d '-' -f 2-` != `uname -r` ]"
    register: result
    ignore_errors: true
  - debug: msg="{{ inventory_hostname }} needs reboot"
    when: result|success
 
  • Like
Reactions: adrian_vg
Have you automatic updates enabled or why don't you "see" that there is reboot required? A new kernel always implies that you should reboot.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!