Bug 36558 - /boot/kernel.h not correct
Summary: /boot/kernel.h not correct
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-18 21:02 UTC by patrick.dowler
Modified: 2014-03-17 02:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-04-18 21:02:44 UTC
Embargoed:


Attachments (Terms of Use)

Description patrick.dowler 2001-04-18 21:02:40 UTC
initscripts-5.00-1
kernel-enterprise-2.2.19-6.2.1

rc.sysinit does not correctly create /boot/kernel.h to give a
consistent version number (as reported with uname -r). This 
breaks compilations (vmware modules, eg). The previous enterprise
kernel happened to work because it also had "smp" in the version
reported by uname -r.

Fix: add definition for __BOOT_KERNEL_ENTERPRISE to kernel.h
like this:

# Generate a header that defines the boot kernel.
if uname -r | grep -q smp ; then
  ENTERPRISE="0"
  SMP="1"
  UP="0"
elif uname -r | grep -q enterprise ; then
  ENTERPRISE="1"
  SMP="0"
  UP="0"
else
  ENTERPRISE="0"
  SMP="0"
  UP="1"
fi
OLDENTERPRISE=`grep "#define __BOOT_KERNEL_ENTERPRISE" /boot/kernel.h 
2>/dev/null | awk '{ print $3 }'`
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 [ "$ENTERPRISE" != "$OLDENTERPRISE" -o "$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_
 
#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

Comment 1 Bill Nottingham 2001-04-18 21:04:12 UTC
This is fixed in the 7.1 initscripts.

Comment 2 patrick.dowler 2001-04-18 22:03:19 UTC
Is it plausible to use the 7.1 initscripts with RedHat6.2? I didn't
think so. I was just reacting to the fact that kernel-2.2.1906.2.1enterprise
requires a mod to rc.sysinit and initscripts was not one of the required
packages to update. It is currently not possible for some people to
migrate to 7.x due to other software constraints. I can fix this
myself (have, in fact), but it means that now I have to be extra-careful
about package upgrades on effected machines. 

Is a new initscripts package for 6.2 possible? likely?

Comment 3 Bill Nottingham 2001-04-18 22:10:25 UTC
Probably not likely at this point.

Comment 4 Bill Nottingham 2001-05-07 13:53:05 UTC
*** Bug 39239 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.