Add check for make stuff to /etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
authorMichael Prokop <devnull@localhost>
Wed, 19 Sep 2007 12:09:56 +0000 (14:09 +0200)
committerMichael Prokop <devnull@localhost>
Wed, 19 Sep 2007 12:09:56 +0000 (14:09 +0200)
etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
etc/grml/fai/grml/grml_cleanup_chroot

index 88fd997..88345d5 100755 (executable)
@@ -4,11 +4,10 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Wed Sep 19 13:42:19 CEST 2007 [mika]
+# Latest change: Wed Sep 19 13:51:05 CEST 2007 [mika]
 ################################################################################
 
 set -e
-set -u
 
 # remove some big directories when using class LATEX_CLEANUP:
 if ifclass LATEX_CLEANUP ; then
index e93f175..be7bc6b 100755 (executable)
@@ -52,9 +52,11 @@ einfo "Setting up /etc/inittab"
 cp /etc/inittab.grml  /etc/inittab
 eend $?
 
-einfo "Cleaning up /usr/src/linux-headers-$KERNEL"
-( cd /usr/src && make clean && make symlinks )
-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 )
+   eend $?
+fi
 
 if [ -L /usr/include/linux ] ; then
   einfo "/usr/include/linux is ok" ; eend 0