You are not logged in.

#1 2010-01-12 23:43:02

LukeOrland
Member
From: Chicago
Registered: 2010-01-12
Posts: 2
Website

localhost changed to (none)

post-upgrade or perhaps after some careless configuration editing, my system started crashing as soon as X starts.

My first troubleshooting step is to identify why the localhost is now coming up as (none) instead of the value I set in /etc/hosts.

my /etc/hosts contains the following:

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1        localhost.localdomain    localhost arch_dv1000

# End of file

What other config files could impact the name of localhost?

Last edited by LukeOrland (2010-01-12 23:43:27)

Offline

#2 2010-01-12 23:49:28

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: localhost changed to (none)

rc.conf.

Offline

#3 2010-01-13 00:04:46

LukeOrland
Member
From: Chicago
Registered: 2010-01-12
Posts: 2
Website

Re: localhost changed to (none)

correct. i had the HOSTNAME line commented out in /etc/rc.conf for some reason. dumb mistake. Thanks!

Offline

#4 2010-07-10 09:58:34

biniou
Member
From: France
Registered: 2009-07-07
Posts: 33

Re: localhost changed to (none)

Hi!

I have exactly the same problem except my Hostname line isn't commented. I have the same name in rc.conf and hosts but when I open the console, there is: biniou@(none)
What can I do?

Offline

#5 2010-07-10 13:47:22

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: localhost changed to (none)

biniou wrote:

Hi!

I have exactly the same problem except my Hostname line isn't commented. I have the same name in rc.conf and hosts but when I open the console, there is: biniou@(none)
What can I do?

Hostname is set at startup while the system runs /etc/rc.sysinit (which itself is run from /etc/inittab).

rc.sysinit sources /etc/rc.conf and inside it you have:

if [ "$HOSTNAME" != "" ]; then
    status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
fi

So along the line something is going wrong. You can:

Check that rc.sysinit is in /etc/inittab.
Insert a debug line in /etc/rc.sysinit before/after above lines, for example:

echo "Before if: HOSTNAME = $HOSTNAME" ; sleep 5

Meanwhile you can execute on the command line:

/bin/hostname WhateverName

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#6 2010-07-10 15:26:52

biniou
Member
From: France
Registered: 2009-07-07
Posts: 33

Re: localhost changed to (none)

Thanks for this answer.

I checked my rc.sysinit and there is no lines

 if [ "$HOSTNAME" != "" ]; then
    status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
fi

I also tried in root

 /bin/hostname Laptop

It tells me:

[root@(none) ~]# kdeinit4: preparing to lauch /usr/lib/kde4/libexec/kdontchangethehostname
Warning: No session management specified

Edit: I don't have this message if I stop wicd daemon.

I'm wondering where I screwed up during the installation...I never had this problem before.

Last edited by biniou (2010-07-10 15:35:10)

Offline

#7 2010-07-10 15:37:25

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: localhost changed to (none)

biniou,

pacman -Qo /etc/rc.sysinit

outputs:

/etc/rc.sysinit is owned by initscripts 2010.06-2

Start by reinstalling initscripts, and see if things start to make sense.

However, /bin/hostname Laptop should have worked.


bin/hostname is owned by net-tools 1.60-14

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#8 2010-07-10 15:45:16

biniou
Member
From: France
Registered: 2009-07-07
Posts: 33

Re: localhost changed to (none)

Yeah! You rock Mektub, it worked!

Thanks again for your help! smile

Offline

Board footer

Powered by FluxBB