feat(script): Check deleted files held by an open fd (#1)

This commit is contained in:
hygienic-books 2024-06-07 17:27:48 +02:00
parent efe72d30dc
commit 02ad69bb28

View File

@ -22,6 +22,13 @@ if [[ -n $libs ]]; then
rc=0 rc=0
fi 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) active_kernel=$(uname -r)
current_kernel=$(get_boot_kernel) current_kernel=$(get_boot_kernel)
if [[ $active_kernel != $current_kernel ]]; then if [[ $active_kernel != $current_kernel ]]; then