Re: Debian bookworm: reboot required

2024-02-12 Thread Dan Ritter
Klaus Singvogel wrote: 
> I'm not searching for kind of notifier, instead I want to lookup the reboot 
> by my own (shell) script, like via existance of a file.
> 
> I'll install unattended-upgrades now, and will see, if it helps at next 
> kernel installation.


I will note that while unattended-upgrades can be quite useful,
most individual users and small installations -- in my
experience -- prefer the default policy of apticron, which is to
download upgraded packages and send a mail notification, rather
than to install them automatically.

-dsr-



Re: Debian bookworm: reboot required

2024-02-12 Thread Klaus Singvogel
Hi Andy,

thanks for your helpful response.

Andy Smith wrote:
> On Mon, Feb 12, 2024 at 11:49:18AM +0100, Klaus Singvogel wrote:
> These files are created by the postinst script of individual Debian
> packages. See for example the output of:
> 
> $ grep reboot-required /var/lib/dpkg/info/*

On my Debian Bullseye machine, where I got also a new kernel, I see this:

# grep -l reboot-required /var/lib/dpkg/info/*
/var/lib/dpkg/info/dbus.postinst
/var/lib/dpkg/info/evolution-data-server.postinst
/var/lib/dpkg/info/gnome-shell.postinst

→ no kernel package.

But on this machine the content of reboot-required.pkgs is today (after I got a 
new kernel):

# cat /var/run/reboot-required.pkgs 
linux-image-5.10.0-28-amd64

So I doubt, that the file is only (!) created by /var/lib/dpkg/info/*, as the 
grep lacks of this output: linux-image.postinst

[...]
> None of my kernel-related packages have a postinst that creates
> these files, so I'm not sure that installing a kernel package has
> ever done that.

Agreed.

> I think if you install the unattended-upgrades package it will
> create those files after a kernel upgrade. I do not use that, which
> is why I see nothing cresting those files. Perhaps you have that
> installed elsewhere but not on this machine.

Yes! This was a good pointer. Indeed the unattended-upgrades was installed on 
my Bullseye host, but not on my Bookworm host.

> Are you thinking of update-notifier-common which used to be installed
> by default but was removed entirely in Debian jessie? An approximate
> replacement for this is the package "reboot-notifier".

I'm not searching for kind of notifier, instead I want to lookup the reboot by 
my own (shell) script, like via existance of a file.

I'll install unattended-upgrades now, and will see, if it helps at next kernel 
installation.

Thanks for your help. Great job.

Best regards,
Klaus.
-- 
Klaus Singvogel
GnuPG-Key-ID: 1024R/5068792D  1994-06-27



Re: Debian bookworm: reboot required

2024-02-12 Thread Andy Smith
Hi,

On Mon, Feb 12, 2024 at 11:49:18AM +0100, Klaus Singvogel wrote:
> in the past Debian Distributions there were two files in the system, when a 
> reboot was necessary:
>   /run/reboot-required  /run/reboot-required.pkgs

These files are created by the postinst script of individual Debian
packages. See for example the output of:

$ grep reboot-required /var/lib/dpkg/info/*

> I installed today a new kernel under Debian Bookworm, which
> requires a reboot, but this system lacks of both files. They
> aren't present.

None of my kernel-related packages have a postinst that creates
these files, so I'm not sure that installing a kernel package has
ever done that.

I think if you install the unattended-upgrades package it will
create those files after a kernel upgrade. I do not use that, which
is why I see nothing cresting those files. Perhaps you have that
installed elsewhere but not on this machine.

> How can I find out, if there is a system reboot necessary, in a
> similar way, as it was possible in the past?

Are you thinking of update-notifier-common which used to be installed
by default but was removed entirely in Debian jessie? An approximate
replacement for this is the package "reboot-notifier".

On the same theme there is also "needrestart" which will tell you
which daemons need to be restarted after libraries have been
upgraded.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Debian bookworm: reboot required

2024-02-12 Thread Klaus Singvogel


Hello,

in the past Debian Distributions there were two files in the system, when a 
reboot was necessary:
/run/reboot-required  /run/reboot-required.pkgs

I installed today a new kernel under Debian Bookworm, which requires a reboot, 
but this system lacks of both files. They aren't present.

How can I find out, if there is a system reboot necessary, in a similar way, as 
it was possible in the past?

Thanks in advance.

Best regards,
Klaus.
-- 
Klaus Singvogel
GnuPG-Key-ID: 1024R/5068792D  1994-06-27