You are not logged in.

#1 2009-09-11 10:09:00

rggjan
Member
Registered: 2007-01-06
Posts: 69

[solved] hostname is "macarch" instead of macarch

I have a strange issue with my hostname: I set

HOSTNAME="macarch"

in my /etc/rc.conf. But now, this happens:

jan ~ $  hostname 
"macarch"

That means, the double quotes are in the hostname!

Thats my /etc/hosts:

127.0.0.1    "macarch"    localhost.localdomain    localhost

But when I change "macarch" to macarch (without quotes), after the next reboot it is back with quotes again!

This leads to all sorts of strange errors, such as postfix not working correctly because of "illegal characters in hostname" or something like that...

Anyone knows what to do?

Last edited by rggjan (2009-09-15 07:37:56)

Offline

#2 2009-09-11 10:18:17

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [solved] hostname is "macarch" instead of macarch

rggjan wrote:

Thats my /etc/hosts:

127.0.0.1    "macarch"    localhost.localdomain    localhost

But when I change "macarch" to macarch (without quotes), after the next reboot it is back with quotes again!

This leads to all sorts of strange errors, such as postfix not working correctly because of "illegal characters in hostname" or something like that...

Anyone knows what to do?

That is the issue.  There should not be quotes there.   And it changing back after reboot is really weird...   Are you sure you are saving the version without quotes properly?

Offline

#3 2009-09-14 07:42:36

rggjan
Member
Registered: 2007-01-06
Posts: 69

Re: [solved] hostname is "macarch" instead of macarch

Yes, I am sure. Something must be changing the hosts file after each reboot... What could that be?

And now I have annoying problems like:

jan ~/Desktop $  yaourt -S postfix
resolving dependencies...
looking for inter-conflicts...

Targets (1): postfix-2.6.5-1  

Total Download Size:    3.58 MB
Total Installed Size:   8.43 MB

Proceed with installation? [Y/n] 
:: Retrieving packages from extra...
 postfix-2.6.5-1-x86_64     3.6M  128.6K/s 00:00:29 [###################################################################################################] 100%
checking package integrity...
(1/1) checking for file conflicts                   [###################################################################################################] 100%
(1/1) installing postfix                            [###################################################################################################] 100%
newaliases: warning: valid_hostname: invalid character 34(decimal): "macarch"
newaliases: fatal: unable to use my own hostname
error: command failed to execute correctly

Offline

#4 2009-09-14 15:31:02

Zack89
Member
Registered: 2008-09-24
Posts: 170

Re: [solved] hostname is "macarch" instead of macarch

First off, HI ALLEN! Im back big_smile you helped me last year when I was using arch big_smile well im back hehe... rggjan, looking at this.. I think I know your issue. In your hosts file the proper layout is: ip address, hostname.domain.org, hostname.

but you have...

 127.0.0.1    "macarch"    localhost.localdomain    localhost

Thats wrong.. you have an extra arguement in that string. Delete out the macarch completely from the hosts file. I manually changed my host to macarch and my hosts file still exists as it did when I first set my box up it didnt add that extra arguement in.


Registered User number: 496613. Show your Tux Pride!
http://counter.li.org

Offline

#5 2009-09-15 07:37:33

rggjan
Member
Registered: 2007-01-06
Posts: 69

Re: [solved] hostname is "macarch" instead of macarch

Hi Zack

Well, thanks first of all for the help. It didn't work exactly, I changed the layout and after a reboot it was back to normal again. But then I did a

sudo grep '"macarch"' /etc/*/*

and found out, that the NetworkManager had hostname="macarch" it in its nm-system-settings.conf... and kept changing the host file!

So, changing it there solved the issue big_smile

Offline

#6 2009-09-15 13:23:58

Zack89
Member
Registered: 2008-09-24
Posts: 170

Re: [solved] hostname is "macarch" instead of macarch

Ah ok.. wow it seems like more and more people these days are using NetworkManager.. I use just Network straight up


Registered User number: 496613. Show your Tux Pride!
http://counter.li.org

Offline

Board footer

Powered by FluxBB