Improve portability of linux headers cleanup inside grml_cleanup_chroot
authorMichael Prokop <devnull@localhost>
Sat, 29 Sep 2007 14:56:16 +0000 (16:56 +0200)
committerMichael Prokop <devnull@localhost>
Sat, 29 Sep 2007 14:56:16 +0000 (16:56 +0200)
debian/changelog
etc/grml/fai/grml/grml_cleanup_chroot

index 7cc5e7d..2a6d423 100644 (file)
@@ -6,8 +6,10 @@ grml-live (0.0.3) unstable; urgency=low
   * Make sure $SECONDS is set before outputting the runtime.
   * Unify usage of i386_files, place all template files in
     directory templates now.
+  * Improve portability of linux headers cleanup inside
+    grml_cleanup_chroot.
 
- -- Michael Prokop <mika@grml.org>  Sat, 29 Sep 2007 11:40:22 +0200
+ -- Michael Prokop <mika@grml.org>  Sat, 29 Sep 2007 16:55:47 +0200
 
 grml-live (0.0.2) unstable; urgency=low
 
index fac52ad..6d75ea1 100755 (executable)
@@ -54,7 +54,17 @@ eend $?
 
 if [ -x /usr/bin/make -a -r /usr/src/Makefile ] ; then
    einfo "Cleaning up /usr/src/linux-headers-$KERNEL"
-   ( cd /usr/src && make clean && make symlinks )
+   ( cd /usr/src
+   VER=$(/bin/ls -d /usr/src/linux-headers-* | head -1)
+   VER=${VER##/usr/src/linux-headers-}
+   if [ -n "$VER" ] ; then
+      VER=$VER make clean && \
+      VER=$VER make symlinks
+   else
+      make clean && \
+      make symlinks
+   fi
+   )
    eend $?
 fi