However it doesn’t tell if the user needs actually to reboot or not.
I got this message just now after updating my kernels so I think I should have been informed to reboot the system?
( 7/10) Reloading system bus configuration...
( 8/10) Check if user should be informed about rebooting after certain system package upgrades.
( 9/10) Probing GDK-Pixbuf loader modules...
(10/10) Updating the desktop file MIME type cache...
As far as I know what shows in the text is only a description of the purpose of the ‘hook’ - that it shows up is because it means you need to reboot. It should also pop up a notification (upper right on my screen YMMV) that you SHOULD reboot.
It checks such things as kernels and updates to systemd and so on, so its track record is pretty good!
cat /usr/bin/eos-reboot-required2
#!/bin/bash
# Avoid unnecessary reboots: don't notify if an updated package is
# - not currently running (e.g. alternative kernel)
# - not in use (e.g. alternative driver)
RunningKernel() {
cat /proc/cmdline | sed 's|.*/vmlinuz-\(linux[a-z0-9-]*\) .*|\1|'
}
Main() {
local targets=$(tee /dev/null) # targets from the hook (stdin)
local target
local notify=no
local runningKernel="$(RunningKernel)"
for target in $targets ; do
case "$target" in
linux | linux-lts | linux-zen | linux-hardened | linux-lts?? | linux-lts???)
# Note: only official and older LTS kernels are checked.
if [ "$target" = "$runningKernel" ] ; then
notify=yes
break
fi
;;
nvidia)
if [ "$runningKernel" = "linux" ] ; then
notify=yes
break
fi
;;
nvidia-lts)
if [ "$runningKernel" = "linux-lts" ] ; then
notify=yes
break
fi
;;
btrfs-progs)
if [ -n "$(/usr/bin/df -hT | awk '{print $2}' | grep -w btrfs)" ] ; then
notify=yes
break
fi
;;
*)
notify=yes
break
;;
esac
done
if [ "$notify" = "yes" ] ; then
/usr/bin/eos-reboot-required
fi
}
So changing Exec = /usr/bin/eos-reboot-required2
to Exec = /usr/bin/eos-reboot-required
in /usr/share/libalpm/hooks/eos-reboot-required.hook
should fix it?
Btw, perhaps I should move the topic to bug report ?