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

Raspbian support #38

Closed
fenhl opened this issue Sep 23, 2016 · 2 comments
Closed

Raspbian support #38

fenhl opened this issue Sep 23, 2016 · 2 comments
Assignees
Milestone

Comments

@fenhl
Copy link

fenhl commented Sep 23, 2016

According to this comment, an output of NEEDRESTART-KSTA: 0 means an unknown result. What are possible causes for this? I have installed needrestart on a Pi running Raspbian and it has been displaying this ever since.

@liske
Copy link
Owner

liske commented Sep 24, 2016

needrestart is looking for kernel images with a usual name at /boot/vmlinu*. On Raspbian the image is /boot/kernel.img which is not handled by needrestart.

@liske liske added the bug label Sep 24, 2016
@liske liske self-assigned this Sep 24, 2016
@fenhl fenhl changed the title NEEDRESTART-KSTA: 0 Raspbian support Sep 24, 2016
@liske liske added this to the v2.10 milestone Oct 31, 2016
@liske liske added enhancement and removed bug labels Nov 3, 2016
@liske liske closed this as completed in db810ae Nov 3, 2016
@liske
Copy link
Owner

liske commented Nov 3, 2016

It was a trival patch to support Raspbian:

root@pi:~# needrestart -v -k
[main] eval /etc/needrestart/needrestart.conf
[main] running in root-mode
[Core] Using UI 'NeedRestart::UI::stdio'...
[main] detected systemd
[Kernel] Linux: kernel release 4.4.13-v7+, kernel version #894 SMP Mon Jun 13 13:13:27 BST 2016
Failed to load NeedRestart::Kernel::kFreeBSD: [Kernel/kFreeBSD] Not running on GNU/kFreeBSD!
+ mktemp
+ tmp=/tmp/tmp.yfJjYpSiKr
+ trap rm -f /tmp/tmp.yfJjYpSiKr 0
+ get_version /boot/kernel7.img
+ strings /boot/kernel7.img
+ grep -m 1 ^Linux version 
+ which gunzip
+ try_decompress \037\213\010 xy gunzip
+ + grep -abo ^xy
tr \037\213\010\nxy \nxy=
+ pos=18297
+ + gunzip
tail -c+18297 /boot/kernel7.img
+ get_version /tmp/tmp.yfJjYpSiKr
+ strings /tmp/tmp.yfJjYpSiKr
+ grep -m 1 ^Linux version 
+ exit 0
+ rm -f /tmp/tmp.yfJjYpSiKr
[Kernel/Linux] /boot/kernel7.img => Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13 13:13:27 BST 2016 [4.4.13-v7+]*
+ mktemp
+ tmp=/tmp/tmp.6ct9sIDq09
+ trap rm -f /tmp/tmp.6ct9sIDq09 0
+ get_version /boot/kernel.img
+ + grep -m 1 ^Linux version 
strings /boot/kernel.img
+ which gunzip
+ try_decompress \037\213\010 xy gunzip
+ + grep -abotr \037\213\010\nxy \nxy=
 ^xy
+ pos=18001
+ + gunzip
tail -c+18001 /boot/kernel.img
+ get_version /tmp/tmp.6ct9sIDq09
+ strings /tmp/tmp.6ct9sIDq09
+ grep -m 1 ^Linux version 
+ exit 0
+ rm -f /tmp/tmp.6ct9sIDq09
[Kernel/Linux] /boot/kernel.img => Linux version 4.4.13+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 Mon Jun 13 12:43:26 BST 2016 [4.4.13+]
[Kernel/Linux] Expected linux version: 4.4.13-v7+
Running kernel seems to be up-to-date.

So it seems to work as expected.

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

No branches or pull requests

2 participants