From 426f354a3b9c7082585134c05a469233aced567b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 17 Nov 1999 17:47:43 +0000 Subject: only munge /boot/kernel.h if there's a change --- rc.d/rc.sysinit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index f04d3b7c..b7d1cfba 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -505,7 +505,10 @@ else SMP="0" UP="1" fi -cat > /boot/kernel.h << EOF +OLDSMP=`grep "#define __BOOT_KERNEL_SMP" /boot/kernel.h 2>/dev/null | awk '{ print $3 }'` +OLDUP=`grep "#define __BOOT_KERNEL_UP" /boot/kernel.h 2>/dev/null | awk '{ print $3}'` +if [ "$SMP" != "$OLDSMP" -o "$UP" != "$OLDUP" ]; then + cat > /boot/kernel.h << EOF /* This file is automatically generated at boot time. */ #ifndef __BOOT_KERNEL_H_ #define __BOOT_KERNEL_H_ @@ -520,6 +523,7 @@ cat > /boot/kernel.h << EOF #endif EOF +fi # Now that we have all of our basic modules loaded and the kernel going, # let's dump the syslog ring somewhere so we can find it later -- cgit v1.2.1