Bug 868 - /etc/rc.d/rc.local generates incorrect /etc/issue on SMP machines
/etc/rc.d/rc.local generates incorrect /etc/issue on SMP machines
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1999-01-18 12:09 EST by David Woodhouse
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-05-04 15:45:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Woodhouse 1999-01-18 12:09:46 EST
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)
case "_$arch" in
        _a*) a="an";;
        _i*) a="an";;

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

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

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

# 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 14:08:59 EST
Thank you for the suggestion. It has been noted and will be considered
for upcoming releases.
Comment 2 David Woodhouse 1999-05-03 07:14:59 EDT
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
Comment 3 Bill Nottingham 1999-05-04 15:45:59 EDT
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.