On Tuesday 07 May 2002 19:01, Nadav Har'El wrote: > On Tue, May 07, 2002, Amir Tal wrote about "Re: Nicknames for my Hostname": > > change your hostname to eliran by typing "hostname eliran" > > they type "hostname" to see the new name. logout, login and you are all > > set. tal. > > No. I don't understand why you insist on "correcting" the advice I gave > with an incorrect one.
i didnt correct anything, i just didnt notice that you answered befire i did. i saw your post only a few sec's after posting mine. > The effect of the "hostname" command will only last until the next reboot, > where the init scripts will set the name "localhost" for him - I assume > that's not what he wants. This will happen at least in RedHat, and I would > guess in most other distributions. > i use RH72, 2.4.9-31, and what ever file the "hostname" commnad writes to, lasts forever. after boot, after shutdown, after anything. > Remember, one important principle of Unix and Linux kernels is that the > kernel should not read the filesystem on its own. It shouldn't care, for > example, if the hostname is saved in "/etc/hosts" or > "/etc/sysconfig/network" or "/etc/hostname". It is the job of the > distribution's init scripts (that run during boot) to read this information > from some file and tell the kernel about this (in this case, by the > sethostname(2) system call). > > The code that sets the hostname on boot sits in /etc/rc.d/rc.sysinit > (take a look). It reads /etc/sysconfig/network, takes the HOSTNAME there > and sets runs hostname on it (or "localhost" if no name is defined). > > I couldn't find anything that saves the current hostname during shutdown > to be used on the next bootup. Not that it can't be done - but I don't > think it's done, at least not on Redhat. So you'll have to modify > /etc/sysconfig/network, or use linuxconf, like I suggested. > didnt modify anything, this is the default for me. wierd, i admit, but this is how it works for me. > If you believe I am wrong, please show concrete evidence (which code saves > the hostname on shutdown). no intention to reboot right now just to make a point. i will, however, post the resaults next time i reboot (monthes from today, hopefully) :) -- ----------------------------------------------- [root@localhost /]# make love make: stop : dont know how to make love [root@localhost /]#ls Amir Tal, ICQ : 15748705 http://www.whatsup.org.il ----------------------------------------------- ================================================================To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]