diff --git a/arch-needs-restart.sh b/arch-needs-restart.sh index 5c95dd9..162e6ee 100755 --- a/arch-needs-restart.sh +++ b/arch-needs-restart.sh @@ -22,10 +22,10 @@ if [[ -n $libs ]]; then rc=0 fi -regular_files=$(lsof -n +c 0 2> /dev/null | grep -- '(deleted)' | awk '1 { print $1 ": " $(NF-1) " " $NF }' | sort -u) -if [[ -n $regular_files ]]; then - cat <<< $regular_files - echo "# REGULAR FILES: reboot required" +binaries=$(lsof -n +c 0 2> /dev/null | grep -- '(deleted)' | awk '$(NF-1) ~ /\/s?bin\// { print $1 ": " $(NF-1) " " $NF }' | sort -u) +if [[ -n $binaries ]]; then + cat <<< $binaries + echo "# BINARIES: reboot required" rc=0 fi