aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2001-04-07 15:10:47 +0000
committerPreston Brown <pbrown@redhat.com>2001-04-07 15:10:47 +0000
commite3be63ee62bc71f58224c19d3d5d545fe315fc59 (patch)
treecfd79350710fc9446e26b3550b69d56884684ff4 /rc.d/rc.sysinit
parentd6fa3e10a0769d3ca113b6539188da426a66d686 (diff)
downloadinitscripts-e3be63ee62bc71f58224c19d3d5d545fe315fc59.tar
initscripts-e3be63ee62bc71f58224c19d3d5d545fe315fc59.tar.gz
initscripts-e3be63ee62bc71f58224c19d3d5d545fe315fc59.tar.bz2
initscripts-e3be63ee62bc71f58224c19d3d5d545fe315fc59.tar.xz
initscripts-e3be63ee62bc71f58224c19d3d5d545fe315fc59.zip
broke out kernel.h symlink code from rc.sysinit into /sbin/mkkerneldoth
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit42
1 files changed, 1 insertions, 41 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 261ee762..6564fc7f 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -651,47 +651,7 @@ if grep -q "ide-scsi" /proc/cmdline ; then
fi
# Generate a header that defines the boot kernel.
-KERNEL_TYPE=`uname -r | sed 's_^[^se]*\(\|smp\|enterprise\)$_-\1_;s_^-$__'`
-KERNEL_RELEASE=`uname -r | sed 's|smp\|enterprise||g'`
-
-rpm -q kernel$KERNEL_TYPE-$KERNEL_RELEASE >/dev/null 2>&1 && KERNEL_ARCH=`rpm -q --qf '%{ARCH}' kernel$KERNEL_TYPE-$KERNEL_RELEASE 2>/dev/null` || KERNEL_ARCH=`uname -m`
-
-OLD_KERNEL_ARCH_TYPE=`sed -n 's_^/\* Kernel type \(.*\) \*/_\1_p' /boot/kernel.h 2>/dev/null`
-if [ -n "$KERNEL_ARCH" -a "$KERNEL_ARCH$KERNEL_TYPE" != "$OLD_KERNEL_ARCH_TYPE" ]; then
- ENTERPRISE='0'
- SMP='0'
- UP='0'
- case "$KERNEL_TYPE" in
- -smp) SMP='1';;
- -enterprise) ENTERPRISE='1';;
- *) UP='1';;
- esac
- cat > /boot/kernel.h << EOF
-/* This file is automatically generated at boot time. */
-#ifndef __BOOT_KERNEL_H_
-#define __BOOT_KERNEL_H_
-
-/* Kernel type $KERNEL_ARCH$KERNEL_TYPE */
-
-#ifndef __MODULE_KERNEL_$KERNEL_ARCH
-#define __MODULE_KERNEL_$KERNEL_ARCH 1
-#endif
-
-#ifndef __BOOT_KERNEL_ENTERPRISE
-#define __BOOT_KERNEL_ENTERPRISE $ENTERPRISE
-#endif
-
-#ifndef __BOOT_KERNEL_SMP
-#define __BOOT_KERNEL_SMP $SMP
-#endif
-
-#ifndef __BOOT_KERNEL_UP
-#define __BOOT_KERNEL_UP $UP
-#endif
-
-#endif
-EOF
-fi
+/sbin/mkkerneldoth
# Adjust symlinks as necessary in /boot to keep system services from
# spewing messages about mismatched System maps and so on.