Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO] NetworkManager cambia hostname
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Bionicle
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 172
Location: TI, svizzera

PostPosted: Wed Jan 10, 2007 6:38 pm    Post subject: [RISOLTO] NetworkManager cambia hostname Reply with quote

Ciao a tutti,
da quando ho installato knetworkmanager ho notato che ogni volta che il provider cambia il mio ip mi modifica anche l'hostname.
in /etc/conf.d/hostname ho settato questo: HOSTNAME="Gentoo"
Quando funzionava tutto in console mi ritrovavo con:
Code:
Gentoo Bionicle#

adesso invece ho questo e mi da fastidio:
Code:
80-218-179-XX Bionicle


Uso kde e ogni volta che cambia l'ip mi crea i questi link
Code:
~/.kde/cache-80-218-179-XX
~/.kde/socket-80-218-179-XX
~/.kde/tmp-80-218-179-XX


Questi sono i pacchetti che ho dovuto installare:
Code:
Calculating dependencies... done!
[ebuild  N    ] net-misc/dhcp-3.0.3-r9  USE="-doc -minimal (-selinux) -static" 849 kB
[ebuild  N    ] net-misc/dhcdbd-1.14-r1  USE="-debug" 69 kB
[ebuild  N    ] net-wireless/wpa_supplicant-0.5.4  USE="dbus qt3 qt4 readline ssl -gsm -madwifi" 615 kB
[ebuild  N    ] dev-libs/libnl-1.0_pre6  250 kB
[ebuild  N    ] sys-apps/iproute2-2.6.16.20060323  USE="berkdb -atm -minimal" 377 kB
[ebuild  N    ] app-text/iso-codes-0.58  4,321 kB
[ebuild  N    ] x11-libs/libsexy-0.1.10  USE="-debug -doc" 378 kB
[ebuild  N    ] x11-misc/notification-daemon-0.3.5  USE="-debug" 374 kB
[ebuild  N    ] x11-libs/libnotify-0.4.3  USE="-doc" 380 kB
[ebuild  N    ] net-misc/networkmanager-0.6.4_pre20061223  USE="crypt -debug -doc -gnome" 1,739 kB [2]
[ebuild  N    ] net-misc/knetworkmanager-0.1_p20061029  USE="arts -debug -xinerama" 302 kB [2]


mi sa che la colpa dia in dhcp o dhcdbd, qualcuno a qualche idea su come risolvere questo dilemma?

Grazie
_________________
::::. www.almack.ch .::::


Last edited by Bionicle on Fri Jan 26, 2007 11:35 am; edited 2 times in total
Back to top
View user's profile Send private message
Bionicle
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 172
Location: TI, svizzera

PostPosted: Sat Jan 13, 2007 2:31 pm    Post subject: Reply with quote

Nessuno a qualche idea?

Se non usate k/networkmanager ve lo consiglio é veramente utile (é ancora in fase di sviluppo) ;)
_________________
::::. www.almack.ch .::::
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1419
Location: <ud|me|ts> - Italy

PostPosted: Sat Jan 13, 2007 2:40 pm    Post subject: Reply with quote

Puoi postare il risultato dei comandi:
Code:
hostname
cat ~/.bashrc

Secondo me non hia configurato bene il .bashrc
_________________
LP
Back to top
View user's profile Send private message
Bionicle
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 172
Location: TI, svizzera

PostPosted: Sat Jan 13, 2007 2:44 pm    Post subject: Reply with quote

grazie per la risposta:
ecco i comandi

hostname
Code:
  80-218-179-XX


cat ~/.bashrc
Quote:
-

_________________
::::. www.almack.ch .::::
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1419
Location: <ud|me|ts> - Italy

PostPosted: Sat Jan 13, 2007 2:50 pm    Post subject: Reply with quote

Hai provato a cambiare l'hostname?
Mi viene in mente che l'associazione nome--->ip in locale è gestita da /etc/hosts, è configurato correttamente?
_________________
LP
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4815
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sat Jan 13, 2007 3:10 pm    Post subject: Reply with quote

Bionicle wrote:
(é ancora in fase di sviluppo) ;)

hai dato un'occhio ai bug di kde?

da come la metti, puoi trovare aiuto su questo forum solo se, casualmente, qualcuno usa il tuo stesso programma.

edit: a me, il tuo programma non risulta esistente:
Code:

cloc3@s939 ~ $ emerge -pv net-misc/knetworkmanager

These are the packages that would be merged, in order:

Calculating dependencies \
emerge: there are no ebuilds to satisfy "net-misc/knetworkmanager".

cloc3@s939 ~ $ eix knetworkmanager
No matches found.

http://packages.gentoo.org/search/?sstring=knetworkmanager
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Bionicle
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 172
Location: TI, svizzera

PostPosted: Sat Jan 13, 2007 3:46 pm    Post subject: Reply with quote

lucapost: si l'hostname é configurato correttamente infatti se avvio il pc senza la rate collegata funziona, il problema é che c'é un programma che me lo modifica dopo.

cloc3: si ho già guardato il bug di kde ma non ho trovato niente. Io verrei scrivere il bug ma non riesco a capire che programma mi modifica l'hostname, forse é un problema di networmanager o dhcp non so (ho mandato un mail a lxnay domandano se ha riscontrato lo stesso problema, non mia ha ancora risposto)

Non si trova ancora in portage knetworkmanager ma solo networkmanager, l'ho installato del repository gentopia (ho provato anche da sabayon).

EDIT: qua c'é un problema simile ma non uguale: https://forums.gentoo.org/viewtopic-t-523056-highlight-hostname+networkmanager.html
_________________
::::. www.almack.ch .::::
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Sat Jan 13, 2007 6:54 pm    Post subject: Reply with quote

Il client dhcp non imposta l'hostname a meno che tu non gli passi il parametro -H che forza il client a modificare l'hostname in base a quanto gli viene passato dal server ...
Se tu non hai configurato il client con quell'opzione il problema è altrove ...
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
Bionicle
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 172
Location: TI, svizzera

PostPosted: Sat Jan 20, 2007 10:32 am    Post subject: Reply with quote

Ho guardato il log e voilà ecco cosa fa:

Code:
Jan 20 11:01:58 Gentoo dhcdbd: Started up.
Jan 20 11:02:01 Gentoo hpiod: 1.6.12 accepting connections at 2208...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  starting...
Jan 20 11:02:04 Gentoo eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Jan 20 11:02:04 Gentoo NetworkManager: <debug> [1169290924.277594] GentooReadConfig(): Enabling DHCP for device eth0.
Jan 20 11:02:04 Gentoo NetworkManager: <debug> [1169290924.277868] GentooReadConfig(): Found hostname.
Jan 20 11:02:04 Gentoo NetworkManager: nm_ip4_config_set_hostname: assertion `config != NULL' failed
Jan 20 11:02:04 Gentoo NetworkManager: <info>  eth0: Device is fully-supported using driver '8139too'.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  nm_device_init(): waiting for device's worker thread to start
Jan 20 11:02:04 Gentoo NetworkManager: <info>  nm_device_init(): device's worker thread started, continuing.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Now managing wired Ethernet (802.3) device 'eth0'.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Deactivating device eth0.
Jan 20 11:02:04 Gentoo NetworkManager: <debug> [1169290924.485465] GentooReadConfig(): Enabling DHCP for device eth2.
Jan 20 11:02:04 Gentoo NetworkManager: <debug> [1169290924.485717] GentooReadConfig(): Found hostname.
Jan 20 11:02:04 Gentoo NetworkManager: nm_ip4_config_set_hostname: assertion `config != NULL' failed
Jan 20 11:02:04 Gentoo NetworkManager: <info>  eth2: Device is fully-supported using driver 'ipw2100'.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  nm_device_init(): waiting for device's worker thread to start
Jan 20 11:02:04 Gentoo NetworkManager: <info>  nm_device_init(): device's worker thread started, continuing.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Now managing wireless (802.11) device 'eth2'.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Deactivating device eth2.
Jan 20 11:02:04 Gentoo rc-scripts: WARNING:  net.lo has already been started.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Will activate wired connection 'eth0' because it now has a link.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  SWITCH: no current connection, found better connection 'eth0'.
Jan 20 11:02:04 Gentoo dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.reason
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Will activate connection 'eth0'.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Device eth0 activation scheduled...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) started...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Jan 20 11:02:04 Gentoo NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Jan 20 11:02:05 Gentoo NetworkManager: <info>  Activation (eth0) Beginning DHCP transaction.
Jan 20 11:02:05 Gentoo NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Jan 20 11:02:05 Gentoo NetworkManager: <info>  DHCP daemon state is now 12 (successfully started) for interface eth0
Jan 20 11:02:06 Gentoo dhclient: eth1: unknown hardware address type 24
Jan 20 11:02:07 Gentoo NetworkManager: <info>  DHCP daemon state is now 1 (starting) for interface eth0
Jan 20 11:02:07 Gentoo dhclient: eth1: unknown hardware address type 24
Jan 20 11:02:08 Gentoo dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Jan 20 11:02:08 Gentoo dhclient: DHCPOFFER from 10.177.0.1
Jan 20 11:02:08 Gentoo dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Jan 20 11:02:08 Gentoo dhclient: DHCPACK from 10.177.0.1
Jan 20 11:02:08 Gentoo NetworkManager: <info>  DHCP daemon state is now 2 (bound) for interface eth0
Jan 20 11:02:08 Gentoo NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
Jan 20 11:02:08 Gentoo NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
Jan 20 11:02:08 Gentoo dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.host_name
Jan 20 11:02:08 Gentoo dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.domain_name
Jan 20 11:02:08 Gentoo dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.nis_domain
Jan 20 11:02:08 Gentoo dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.nis_servers
Jan 20 11:02:08 Gentoo NetworkManager: <info>  Retrieved the following IP4 configuration from the DHCP daemon:
Jan 20 11:02:08 Gentoo NetworkManager: <info>    address 80.218.179.36
Jan 20 11:02:08 Gentoo NetworkManager: <info>    netmask 255.255.224.0
Jan 20 11:02:08 Gentoo NetworkManager: <info>    broadcast 255.255.255.255
Jan 20 11:02:08 Gentoo NetworkManager: <info>    gateway 80.218.160.1
Jan 20 11:02:08 Gentoo NetworkManager: <info>    nameserver 62.2.17.60
Jan 20 11:02:08 Gentoo NetworkManager: <info>    nameserver 62.2.24.162
Jan 20 11:02:08 Gentoo NetworkManager: <info>    nameserver 62.2.17.61
Jan 20 11:02:08 Gentoo NetworkManager: <info>    nameserver 62.2.24.158
Jan 20 11:02:08 Gentoo NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
Jan 20 11:02:08 Gentoo NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
Jan 20 11:02:08 Gentoo NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
Jan 20 11:02:08 Gentoo dhclient: bound to 80.218.179.36 -- renewal in 1353 seconds.
Jan 20 11:02:09 Gentoo NetworkManager: <info>  Setting hostname to '80-218-179-36'
Jan 20 11:02:09 Gentoo NetworkManager: <info>  Activation (eth0) successful, device activated.
Jan 20 11:02:09 Gentoo NetworkManager: <info>  Activation (eth0) Finish handler scheduled.
Jan 20 11:02:09 Gentoo NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.


la domanda é: ma di chi é la colpa del cambiamento del hostname?.
Sembrerebbe di networkmanager ma da quello che ho capito riceve le informazioni da dhclient, é corretto?
Code:
Jan 20 11:02:09 Gentoo NetworkManager: <info>  Setting hostname to '80-218-179-36'

Se so esattamente il nome programma che non funziona correttamente posso cercare più a fondo e forse smanettando con le configurazioni farlo andare.
Grazie.
_________________
::::. www.almack.ch .::::
Back to top
View user's profile Send private message
Bionicle
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 172
Location: TI, svizzera

PostPosted: Fri Jan 26, 2007 11:34 am    Post subject: Reply with quote

HO risolto leggendo questo help sulla lista dei mail di networkmanager:

soluzione: http://mail.gnome.org/archives/networkmanager-list/2007-January/msg00137.html

La soluzione consiste semplicemente nel settare questi valori in /etc/dhcp/dhclient.conf:
Code:

send host-name "<your_hostname>";
supersede host-name "<your_hostname>";


Ciao
_________________
::::. www.almack.ch .::::
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum