From 5cfb285d874809cedd269231b571704a9b6602b7 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 29 Sep 2007 16:56:16 +0200 Subject: [PATCH] Improve portability of linux headers cleanup inside grml_cleanup_chroot --- debian/changelog | 4 +++- etc/grml/fai/grml/grml_cleanup_chroot | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7cc5e7d..2a6d423 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 29 Sep 2007 11:40:22 +0200 + -- Michael Prokop Sat, 29 Sep 2007 16:55:47 +0200 grml-live (0.0.2) unstable; urgency=low diff --git a/etc/grml/fai/grml/grml_cleanup_chroot b/etc/grml/fai/grml/grml_cleanup_chroot index fac52ad..6d75ea1 100755 --- a/etc/grml/fai/grml/grml_cleanup_chroot +++ b/etc/grml/fai/grml/grml_cleanup_chroot @@ -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 -- 2.1.4