aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrc.d/rc.sysinit6
1 files changed, 5 insertions, 1 deletions
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