after removing a module try to remove the path (below
/lib/modules/KVERS) were the module was installed to cleanup any
remaining empty directories
Closes: #657145
---
 dkms |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/dkms b/dkms
index 042acc0..c96cd8f 100644
--- a/dkms
+++ b/dkms
@@ -1579,6 +1579,9 @@ do_uninstall()
            echo $" - Uninstallation"
            echo $"   - Deleting from: 
$install_tree/$1${real_dest_module_location}/"
            rm -f 
"$install_tree/$1${real_dest_module_location}/${dest_module_name[$count]}$module_suffix"
+           dir_to_remove="${real_dest_module_location#/}"
+           while [ "${dir_to_remove}" != "${dir_to_remove#/}" ]; do 
dir_to_remove="${dir_to_remove#/}" ; done
+           (cd "$install_tree/$1" && rmdir --parents 
--ignore-fail-on-non-empty "${dir_to_remove}" || true)
            echo $" - Original module"
            if [[ -e 
$dkms_tree/$module/original_module/$1/$2/${dest_module_name[$count]}$module_suffix
 ]]; then
                case "$running_distribution" in
-- 
1.7.10




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to