Skip to content

Commit

Permalink
update through script - 2024-11-15 15:46:04
Browse files Browse the repository at this point in the history
  • Loading branch information
oasido committed Nov 15, 2024
1 parent d82f1f4 commit 05bd23a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .local/bin/scripts/dkms-clean
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ dkms_modules=$(sudo dkms status)

echo "$dkms_modules" | while read -r line; do
module_name=$(echo "$line" | cut -d',' -f1)
module_version=$(echo "$line" | cut -d',' -f2 | tr -d ' ')

kernel_version=$(echo "$line" | cut -d',' -f2 | tr -d ' ')

if [ "$kernel_version" != "$current_kernel" ]; then
echo "Removing $module_name $module_version for kernel $kernel_version"
sudo dkms remove -k "$kernel_version" "$module_name/$module_version"
echo "Removing $module_name for kernel $kernel_version"
sudo dkms remove -k "$kernel_version" "$module_name"
else
echo "Keeping $module_name $module_version for current kernel $current_kernel"
echo "Keeping $module_name for current kernel $current_kernel"
fi
done

0 comments on commit 05bd23a

Please sign in to comment.