Hostname changes and the shell prompt...

Mr.Mike. paix at konaboy.com
Thu Oct 5 18:44:43 PDT 2000


why not make a cronjob that sources your /etc/profile or ~/.profile or
.bash_profile of course when in X it can be a little tricky making sure
your getting a login shell uh versus an interactive one, if you follow.

on debian 

crontab -e  

/5 * * * * source /etc/profile 



:wq 

??

i didn't really pick thru your PS1 but seems to me your hostname should
not be getting "nuked". anyway




aloha,

kona_mike



On Wed, 4 Oct 2000, Ben Beeson wrote:

>Aloha all,
>
>	I am running RH 6.0 with kernel 2.2.14-5.0.14c on a machine
>connected to a cable modem with Road Runner.  I have noticed that once in a
>while my IP address gets renumbered.  That's OK, because Road Runner uses dhcp
>and that's what it does.  My shell prompt is:
>  
>PS1="[\u@\h \W]\\$ "   
>
>So what I get is a shell prompt that looks like this:
>
>[ben at a24b165n42client129 ben]$   
>
>The only problem is that the hostname part of the prompt doesn't match
>the current IP address. It matches the IP address that was obtained when the
>machine was booted.  In other words, if I get renumbered, my prompt doesn't
>change.
>
>	I would like to know if anyone knows how to fix this so that the prompt
>variable updates and displays the correct IP address in the hostname portion of
>the prompt.  If I can't do that, how can I assign a local hostname to the box
>that doesn't get nuked when I get an IP address from the dhcp server?  
>
>Thanks in advance,
>
>Ben Beeson         
>                                                
>
>
>---
>You are currently subscribed to luau as: paix at konaboy.com
>To unsubscribe send a blank email to $subst('Email.Unsub')
>

__ 
 
Michael Ferdun, M.S.  http://206.132.163.167/paixaloha | paix at konaboy.com
http://paix.dyndns.org:8080  icq#85495629      Imua! - go forward
 
__

IBM Pollyanna Principle:
	Machines should work.  People should think.



More information about the LUAU mailing list