Quote Originally Posted by Raffx View Post
I'm searching for something that let's me know whether or not my system would need a reboot (kernel update etc). Red Hat has the yum/dnf plugin needs-restarting, SUSE15 has ported this over as well and it's available since 15.1. Debian/Ubuntu have the file /var/run/reboot-required and if that exists a reboot is required.

But I couldn't find anything on SLES 12 that let's me check this in a script.

The ultimate goal is to build this into our update management with ansible. Updates get installed and if a reboot is required, it's done as well.

Someone got an idea?
Hi and welcome to the Forum
After an update the output from the command zypper ps -s will output if core libraries have been updated and a reboot is required. Dare I say look at the man page for zypper

There are exit codes;

Code:
102 - ZYPPER_EXIT_INF_REBOOT_NEEDED
           Returned after a successful installation of a patch which requires reboot of computer.
The current releases have a file /etc/zypp/needreboot where files that are updated can trigger a reboot request.