You are not logged in.

#1 2011-10-18 13:58:41

namelessone
Member
Registered: 2009-12-17
Posts: 41

no hostname

Sometime after the move of hostname from net-tools to inetutils my computer's hostname became very erratc.

By erratic I mean it occasionally does not get set. I will boot my computer, and have no hostname. But only sometimes. Other times it works. Sometimes I will get it, and then suspend to ram, and then I lose it again. But other times, suspend to ram does not cause trouble.

This lack of hostname causes other problems, such as unable to start gui programs.

Anyone have an idea on how to fix this?

Offline

#2 2011-10-18 14:09:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: no hostname

Do you have inetutils installed?

Last edited by karol (2011-10-18 14:10:43)

Offline

#3 2011-10-18 14:14:17

namelessone
Member
Registered: 2009-12-17
Posts: 41

Re: no hostname

karol wrote:

Do you have inetutils installed?

Yes. inetutils is installed.

Offline

#4 2011-10-18 14:30:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: no hostname

What's the output of 'echo $HOSTNAME'?

Offline

#5 2011-10-18 15:39:01

namelessone
Member
Registered: 2009-12-17
Posts: 41

Re: no hostname

karol wrote:

What's the output of 'echo $HOSTNAME'?

the $HOSTNAME variable is blank when I have no hostname.

Offline

#6 2011-10-18 15:46:08

sensei
Member
Registered: 2011-10-14
Posts: 35

Re: no hostname

cat /etc/rc.conf | grep HOSTNAME

What does the command above give you? If it's blank, try to type in the hostname you want.

Offline

#7 2011-10-18 15:46:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: no hostname

namelessone wrote:
karol wrote:

What's the output of 'echo $HOSTNAME'?

the $HOSTNAME variable is blank when I have no hostname.

And other times it's set to what you have in rc.conf?

sensei wrote:
cat /etc/rc.conf | grep HOSTNAME

What does the command above give you? If it's blank, try to type in the hostname you want.

Save the cat!

grep ^HOSTNAME /etc/rc.conf

;P

Last edited by karol (2011-10-18 15:48:03)

Offline

#8 2011-10-18 15:53:45

namelessone
Member
Registered: 2009-12-17
Posts: 41

Re: no hostname

Yes, my HOSTNAME is set in rc.conf.

Sometimes I get that hostname, other times, I get no host name. There seems to be no pattern to it, but it's probably close to 50% of the time. Also, there appears to be a 50%* chance to lose the hostname upon resuming from pm-suspend.

*this percentage is entirely arbitrary...I just know it happens a lot.

Offline

#9 2011-10-19 00:02:08

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: no hostname

Not sure if it's related, but awfully suspicious that I was having terrible connection problems after upgrading to inetutils 1.8-6 a couple of days ago. Just downgraded to 1.8-5 and connection is solid as a rock. Using b43 driver for my wifi, by the way.

Scott

Edit: probably disregard this. Looks like I spoke too soon. Sorry hmm My connection isn't dropping but I'm still regularly losing my DNS info...therefore no internet but SSH sessions stay active.

Last edited by firecat53 (2011-10-19 00:19:08)

Offline

#10 2011-10-20 17:15:19

namelessone
Member
Registered: 2009-12-17
Posts: 41

Re: no hostname

Well, I have ruled out the possibility of the kernel (I downgraded and had the same issue) and I also tried downgrading inetutils. Now I am at a loss of what to try next.

When does the hostname get set? Is there an error log I can look at? Where is the hostname stored (besides $HOSTNAME in the shell)?

Offline

#11 2011-10-21 16:03:12

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: no hostname

cat /etc/hosts? And FWIW, for me:

cur_work$ echo $HOSTNAME
moonshine
cur_work$ pacman -Q net-tools inetutils
error: package "net-tools" not found
error: package "inetutils" not found

Last edited by Leonid.I (2011-10-21 16:04:55)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#12 2011-10-22 02:38:42

namelessone
Member
Registered: 2009-12-17
Posts: 41

Re: no hostname

Yeah, I know the hostname is in /etc/hosts, I just have a suspicion that is not the only place. After doing a little research I discovered the hostname set by the rc.sysinit script goes into /proc/sys/kernel/hostname. I'll watch that value the next time I lose my hostname (which will probably be tomorrow).

EDIT: After much experimentation I discovered that my hostname is being erased by dhclient.

Last edited by namelessone (2011-11-08 14:53:24)

Offline

Board footer

Powered by FluxBB