Suggestion: garuda-update should prompt for restart

I concur it may be nice to have.
Perhaps we can take inspiration from jutil/rbc at master · qth/jutil · GitHub and/or check for any open files in system folders that were changed/deleted on disk? I may have a crack at it.
On a side note, I just found out about GitHub - openSUSE/transactional-update: Atomic updates for Linux operating systems.

An interesting question is also, are there times when a reboot may cause problems?
I noticed a few background jobs start running after an upgrade.
There is likely no need to do so, but I generally let them finish before restarting.

As a quick and dirty reminder, some time ago I put a little script on my waybar power button to turn it red while upgrading and green if last upgrade is more recent then last reboot (using the same logic found in the garuda-inxi script, but that would have me reboot every time even if not strictly necessary). It works by wrapping garuda-update to send it a signal before and after the upgrade.
Far from being perfect, but at least I won't reboot again while a kernel upgrade is running in another workspace LOL.


edit: found more info, testing.
file /boot/vmlinuz* |grep -Po 'version \K\S+' vs uname -r
date -r /boot +%s
lsof -n |grep '(path inode=.*)' (lsof -wLnPlXbO +c0 |awk '$4 == "DEL" && ...)
possibly other checks, ideas welcome.


Found GitHub - liske/needrestart: Restart daemons after library updates.
Still having fun reinventing the wheel.


Found time to play with this again. Script is here.

5 Likes