aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-11-17 17:47:43 +0000
committerBill Nottingham <notting@redhat.com>1999-11-17 17:47:43 +0000
commit426f354a3b9c7082585134c05a469233aced567b (patch)
tree8c3d2204a90fd35303f2afa7201310bd29b9ac0e
parent1dc88000a360f5f4fe8bc0a23248630ba617cc85 (diff)
downloadinitscripts-426f354a3b9c7082585134c05a469233aced567b.tar
initscripts-426f354a3b9c7082585134c05a469233aced567b.tar.gz
initscripts-426f354a3b9c7082585134c05a469233aced567b.tar.bz2
initscripts-426f354a3b9c7082585134c05a469233aced567b.tar.xz
initscripts-426f354a3b9c7082585134c05a469233aced567b.zip
only munge /boot/kernel.h if there's a change
-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