Simon Naish wrote on Tue, Jun 25, 2002 at 12:47:57AM +0100 : > At Last!!!! > This:- > > >Where are you changing the hostname (what file)? The > > >hostname is set in /etc/sysconfig/network. /etc/hosts > > >relates hostnames to IP addresses but doesn't really set > > >anything. > this is what isn't obvious. I dont have a network at home, but I dont want to have >to call my Linux box localhost.localdomain . I'd totally given up in Mandrake - its >about the third thing you choose in a Slackware install - I couldn't find what file >really held the hostname.
The first thing that happens when the kernel finishes booting is it mounts the root filesystem and then calls "/sbin/init". This then reads the /etc/inittab file which is a list of things to do on startup (or change in runlevels in general). One of the first things is to run the rc.sysinit script. The rc.sysinit script is located at /etc/rc.d/rc.sysinit and you can take a look at it if you look. If you do a search for "HOSTNAME", you'll see where it reads in /etc/sysconfig/network (which sets the HOSTNAME variable) and then runs the /sbin/hostname command with it. A really good document that details the boot process is: http://www.redhat.com/support/resources/tips/Boot-Process-Tips/Boot-Process-Tips.html Blue skies... Todd P.S. It's also considered courteous to trim email messages of unneeded extra parts. If you force yourself to reply to bottom-post (or inline) instead of top-posting, you generally develop good habits of deleting the unnecessary parts. -- Todd Lyons -- MandrakeSoft, Inc. http://www.mandrakesoft.com/ UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn Cooker Version mandrake-release-8.3-0.2mdk Kernel 2.4.18-20mdk
msg55695/pgp00000.pgp
Description: PGP signature
