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.
This commit is contained in:
10
linux55-tkg/linux55-tkg-config/cleanup
Executable file
10
linux55-tkg/linux55-tkg-config/cleanup
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/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:
|
||||
|
Reference in New Issue
Block a user