diff --git a/arch-needs-restart.sh b/arch-needs-restart.sh index a6237f5..bbfc33b 100755 --- a/arch-needs-restart.sh +++ b/arch-needs-restart.sh @@ -22,6 +22,13 @@ if [[ -n $libs ]]; then rc=0 fi +binaries=$(lsof -n +c 0 2> /dev/null | grep -- '(deleted)' | awk '1 { print $1 ": " $(NF-1) " " $NF }' | sort -u) +if [[ -n $binaries ]]; then + cat <<< $binaries + echo "# REGULAR FILES: reboot required" + rc=0 +fi + active_kernel=$(uname -r) current_kernel=$(get_boot_kernel) if [[ $active_kernel != $current_kernel ]]; then