Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 868 - /etc/rc.d/rc.local generates incorrect /etc/issue on SMP machines
Summary: /etc/rc.d/rc.local generates incorrect /etc/issue on SMP machines
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-18 17:09 UTC by David Woodhouse
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-05-04 19:45:04 UTC


Attachments (Terms of Use)

Description David Woodhouse 1999-01-18 17:09:46 UTC
The rc.local script generates a line like "Kernel 2.2.0-pre5
on an i686", even on SMP machines which should read "Kernel
2.2.0-pre5 on a pair of i686s".

Try something like:

arch=$(uname -m)
a="a"
case "_$arch" in
        _a*) a="an";;
        _i*) a="an";;
esac



NUMPROC=$[`cat /proc/cpuinfo | grep ^processor | wc -l`]

if [ "$NUMPROC" = "2" ]; then NUMPROC="a pair of"; fi

if [ "$NUMPROC" = "1" ]
then
  TAILBIT="$(uname -r) on $a $(uname -m)"
else
  TAILBIT="$(uname -r) on $NUMPROC $(uname -m)s"
fi

# This will overwrite /etc/issue at every boot.  So, make
any changes you
# want to make to /etc/issue here or you will lose them when
you reboot.

echo "" > /etc/issue.net
echo "Red Hat Linux $R" >> /etc/issue.net
echo "Kernel $TAILBIT" >> /etc/issue.net

Comment 1 David Lawrence 1999-01-18 19:08:59 UTC
Thank you for the suggestion. It has been noted and will be considered
for upcoming releases.

Comment 2 David Woodhouse 1999-05-03 11:14:59 UTC
This 'bug' still exists in 6.0, and can more realistically be called a
bug now that SMP is officially supported.

Even though it's only cosmetic, it's the first sign many people will
see as to whether Linux is using more than one processor or not - and
it gives the wrong impression. I expect that this will lead to much
confusion as people wonder 'why is it only using one'.

Even if the logic I gave isn't acceptable for some reason, consider
changing the message to "Kernel `uname -r` on the `uname
-a` architecture", to remove the implication that there's only one
processor.

Comment 3 Bill Nottingham 1999-05-04 19:45:59 UTC
Will be fixed in next initscripts release (4.17-1).
It will say something along the lines of
'Kernel 2.2.6-14smp on a 4-processor i686'


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