Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No reboot detection in batch mode #22

Closed
schoekek opened this issue Apr 6, 2016 · 3 comments
Closed

No reboot detection in batch mode #22

schoekek opened this issue Apr 6, 2016 · 3 comments
Assignees
Labels

Comments

@schoekek
Copy link

schoekek commented Apr 6, 2016

Hi,

i have installaled the last version from Debian Backports on Jessie (2.7-1~bpo8+1) and no reboot detect is visible.

[06:52:37] user@dev:~> sudo needrestart -bkv
[main] eval /etc/needrestart/needrestart.conf
[main] running in root-mode
[main] detected systemd
NEEDRESTART-VER: 2.7
[Kernel] Linux: kernel release 3.16.0-4-amd64, kernel version #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29)
Failed to load NeedRestart::Kernel::kFreeBSD: [Kernel/kFreeBSD] Not running on GNU/kFreeBSD!
[Kernel/Linux] /boot/vmlinuz-3.16.0-4-amd64 => 3.16.0-4-amd64 (debian-kernel@lists.debian.org) #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) [3.16.0-4-amd64]
[Kernel/Linux] Expected linux version: 3.16.0-4-amd64
NEEDRESTART-KCUR: 3.16.0-4-amd64
NEEDRESTART-KEXP: 3.16.0-4-amd64
NEEDRESTART-KSTA: 2
[06:52:43] user@dev:~> echo $?
0

On normal needrestart call, the ncurses hint for required reboot is visible...

@liske liske self-assigned this Apr 13, 2016
@liske liske added the question label Apr 13, 2016
@liske
Copy link
Owner

liske commented Apr 13, 2016

Hi,

the reboot information is encoded in NEEDRESTART-KSTA. Sadly the documentation is missing a detailed description, taken from the perl/lib/NeedRestart/Kernel.pm:

use constant {
    NRK_UNKNOWN    => 0,   # uknown result (i.e. no image found)
    NRK_NOUPGRADE  => 1,   # kernel is up-to-date
    NRK_ABIUPGRADE => 2,   # ABI upgrade pending
    NRK_VERUPGRADE => 3,   # higher kernel version pending
};

HTH,
Thomas

@schoekek
Copy link
Author

ah, ok.
thx for the information.

@MarcinOrlowski
Copy link

MarcinOrlowski commented Apr 17, 2017

Can you at least add note that to README.md? I just wasted some time prior finding this ;(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants