You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when updating, we may need to reboot the system to apply the changes, for example when updating a kernel. So I thought about create a script to check if there is any crucial update that needs to reboot and then show in tray. Then I asked myself: why not suggest to the Arch Linux Update Indicator to include it, as long as I don't know how to deal with extensions and stuff? So here I am.
Script
I found a script in internet to check kernel and libs, then I adapted to crucial updates (kernal, systemd, glibc and xorg). It depends on lsof, so it's a requirement
Here is the script
#!/bin/bash
get_boot_kernel() {
local get_version=0
for field in $(file /boot/vmlinuz*); do
if [[ $get_version -eq 1 ]]; then
echo $field
return
elif [[ $field == version ]]; then
# the next field contains the version
get_version=1
fi
done
}
rc=1
libs=$(lsof -n +c 0 | grep 'xorg\|libc\|systemd' | grep 'DEL.*lib' | awk '1 { print $1 ": " $NF }' | sort -u)
if [[ -n $libs ]]; then
cat <<< $libs
echo "# LIBS: reboot required"
rc=0
else
echo "# LIBS: No action needed"
fi
active_kernel=$(uname -r)
current_kernel=$(get_boot_kernel)
if [[ $active_kernel != $current_kernel ]]; then
echo "$active_kernel < $current_kernel"
echo "# KERNEL: reboot required"
rc=0
else
echo "# KERNEL: No action needed"
fi
exit $rc
Conclusion
Is it possible to add this feature to the extension?
It would be great!
Thank you!
The text was updated successfully, but these errors were encountered:
I kinda like the idea, but I must find another way to do it. I don't want to add a dependency, and I cannot ship a shell script with the extension.
It must be done in javascript. I will try to see if what your script does can be achieved in JS. Hope so ;)
Description
Sometimes when updating, we may need to reboot the system to apply the changes, for example when updating a kernel. So I thought about create a script to check if there is any crucial update that needs to reboot and then show in tray. Then I asked myself: why not suggest to the Arch Linux Update Indicator to include it, as long as I don't know how to deal with extensions and stuff? So here I am.
Script
I found a script in internet to check kernel and libs, then I adapted to crucial updates (kernal, systemd, glibc and xorg). It depends on
lsof
, so it's a requirementHere is the script
Conclusion
Is it possible to add this feature to the extension?
It would be great!
Thank you!
The text was updated successfully, but these errors were encountered: