Chmouel Boudjnah <[EMAIL PROTECTED]> writes:

> this should be kheader, there is no easy way to do it actually, i'll
> take a look about that..

Humm in fact it's fairly easy :

--- kheader.~1.8.~      Thu Nov 15 10:51:14 2001
+++ kheader     Tue Jan 15 15:26:49 2002
@@ -71,6 +71,14 @@
 fi
 }
 
+function remove_orphaned {
+    local version= i=
+    for i in /boot/kernel.h-*;do
+       version=${i##*.h-}
+       [[ -f /boot/vmlinuz-${version} ]] || rm -f /boot/vmlinuz-${version}
+    done
+}
+
 case $1 in 
     start)
     # We don't log this command, because most users don't want to hear this (c) Chmou
@@ -83,6 +91,7 @@
        generate
        ;;
     stop)
+       remove_orphaned;
        rm -f /var/lock/subsys/kheader
        ;;
     status)


-- 
http://www.linux-mandrake.com/en/club/

Reply via email to