* garyumc [Fri, Mar 30, 2001 at 10:13:42AM +0800]:
> Dear all,
> 
> My machine is RH6.2..
> I've changed the following lines in /etc/rc.d/rc.local
> 
>    echo "Welcome to %h" > /etc/issue
>    echo "PentiumIII 750MHz,256Mb,20Gb" >> /etc/issue
>    echo "$R" >> /etc/issue
>    echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue
>    echo "" >> /etc/issue
> 
>    cp -f /etc/issue /etc/issue.net
>    echo >> /etc/issue
> 
> but the problem is, when I telnet in to mch, I can get the proper 
> pre-login message, but when login at console, the first line will become 
> "Welcome to %h" where %h can't get the hostname??

How about this:

  echo "Welcome to $(hostname)" >> /etc/issue
  echo -n "$(egrep '^model name' /proc/cpuinfo | cut -b 14-50), " >> /etc/issue
  echo "$(free -m | egrep '^Mem:' | cut -b 16-18) Mb, 20Gb" >> /etc/issue
  cat /etc/redhat-release >> /etc/issue
  echo >> /etc/issue

  cp -f /etc/issue /etc/issue.net
  echo >> /etc/issue

It's a bit nicer than a static, dull script  :)  I don't know of a
suitable command to find the size of /dev/hda or whatever your drive
is though.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to