D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Hostname woes



Hi Simon,

grep for "hostname" gives this:

[root@xxxxxxxxx root]# grep hostname /etc/init.d/*
/etc/init.d/cups:           # Check, if we have a real network, if not,
let the hostname be
/etc/init.d/cups:               #/bin/hostname localhost
/etc/init.d/cups:           # to avoid printer info with hostname
"localhost" being

I tried a grep for "localhost" as well and got:

/etc/init.d/cups:           # "localhost"
/etc/init.d/cups:               #/bin/hostname localhost
/etc/init.d/cups:           # Is there a correct "localhost" line?
/etc/init.d/cups:           #if !(/bin/egrep
"^127\.0\.0\.1[[:space:]]+localhost\.localdomain[[:space:]]+localhost"
/etc                                   /hosts > /dev/null 2>&1); then
/etc/init.d/cups:           #    gprintf "Correcting 'localhost' line in
/etc/hosts ...\n";
/etc/init.d/cups:           #    # Correct "localhost" line with wrong
IP
/etc/init.d/cups:           #    perl -p -i -e
"s/^\s*[\d\.]+\s+.*localhost.*$/127.0.0.1\t\tlocalhost.localdomain\tlocal            
                      host/" /etc/hosts
/etc/init.d/cups:           #    perl -p -i -e
"s/^\s*127.0.0.1\s+.*$/127.0.0.1\t\tlocalhost.localdomain\tlocalhost/"
/e                                   tc/hosts
/etc/init.d/cups:           #    # Add "localhost" line if missing
/etc/init.d/cups:           #        echo -en
"127.0.0.1\t\tlocalhost.localdomain\tlocalhost\n" >> /etc/hosts
/etc/init.d/cups:           # to avoid printer info with hostname
"localhost" being
/etc/init.d/httpd:STATUSURL="http://localhost/server-status";
/etc/init.d/httpd:STATUSURLPERL="http://localhost:8200/server-status";
/etc/init.d/nfs:            /usr/sbin/rpcinfo -u localhost nfs 2
&>/dev/null
/etc/init.d/nfs:            /usr/sbin/rpcinfo -u localhost nfs 3
&>/dev/null

I don't know if any of that helps at all.

Also a friend of mine suggested adding the right hostname to /etc/hostname
(although that file was not on my system).  Do you know what the syntax ought
to be?

Kind regards,

Julian


On Mon, 2004-06-14 at 17:09, Simon Waters wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julian Hall wrote:
|
| So far I have edited four files and it still won't stick.  One guy said
| to edit three files, two of which I don't even have!

Unfortunately these things vary slightly between distro's, and I haven't
done Mandrake for a while.

| I've seen the message "setting hostname to localhost" in the boot
| sequence, so somewhere there is a file with that setting.  If you (or
| anyone) could tell me which file that is I would be very grateful.

Usually "hostname" is the command to set hostname. Try "man hostname" or
grep the start up files for "hostname" 'grep hostname /etc/init.d/*' ;)

| On a related issue, I sometimes get "RPC: program not registered" during
| boot and NFS dies.  Why would that be?

"RPC: program not registered" is produced when a program tries to use an
ONC RPC call when the server component isn't ready.

In this case probably the NFS server isn't running (or complete) and so
the client is failing, as all NFS code is done using ONC RPC it is hard
to say more without details.

The "rpcinfo" command will tell you what programs are registered on a
specific server.

i.e.

$ rpcinfo -p localhost
~   program vers proto   port
~    100000    2   tcp    111  portmapper
~    100000    2   udp    111  portmapper
~    100024    1   udp    718  status
~    100024    1   tcp    721  status

You would expect to see rather more programs if NFS is configured -
statd, mountd etc.

But I thought most NFS's default to witing for the server to start - or
waiting a bit - it is usually configurable.
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFAzhQFGFXfHI9FVgYRAvzMAJ0c8dgGr2UuS2YQv541kg/6mPZgnwCgimsx
R1fD/277Pp1cwYxu4WP4Pnw=
=V6OX
-----END PGP SIGNATURE-----

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.



Lynx friendly