Closed linuxdan closed 2 years ago
@trevor-vaughan does this use /var/lib/reboot-required
on OSes that support it?
@raphink Honestly, I didn't even know that was a thing! But now that I do, it probably should. In this case, I wanted to be able to give useful metadata to the user about why the reboot was required and be able to have multiple reasons based on different parts of code.
@raphink Do you know of a way of definitively detecting if an OS supports that file? It seems like it's a Debian-ish thing. I could always just drop the file in place no matter what but that seems...weird.
@trevor-vaughan Does your code actually cause a reboot or just create a notification?
@raphink
/var/lib/reboot-required looks like a Debian thing.
Even so, I can find no guidance about using it.
Most of the Red Hat/CentOS search results refer to yum’s needs-restarting
, but this operation does not use yum.
What I do is notify https://forge.puppet.com/modules/puppetlabs/reboot. Works great.
Example: (RHEL 7)
kernel_parameter{'ipv6.disable': ensure => absent, }