linux-tkg/linux54-tkg/linux54-tkg-config/cleanup
Tk-Glitch f0f7c029f3 Add a simple post transaction hook to clean remnant dir/files
Since the move to the new hooking mechanisms, we got remnant files after package upgrade.
They aren't part of the package and get generated by the depmod hook.
This addresses the issue by checking for tkg kernels module dirs and removing the ones missing a vmlinuz file (which is part of the package).
Due to the way it works, it'll also get rid of all past remnants to stay transparent for users.
2020-05-01 00:22:00 +02:00

11 lines
141 B
Bash
Executable File

#!/bin/bash
for _f in /usr/lib/modules/*tkg*; do
if [[ ! -e ${_f}/vmlinuz ]]; then
rm -rf "$_f"
fi
done
# vim:set ft=sh sw=2 et: