|
#1
| |||
| |||
| hostname strange behavior I'm using Leopard 10.5.2, MBP. When I was using 10.4.something, I set the hostname to X using system preferences -> sharing. Everything worked fine. Months later, after upgrading to 10.5.1, I set the hostname to Y by the same method. This appeared to work properly. I then upgraded later to 10.5.2. When I started the terminal I discovered my bash shell prompt, which is defined as: $echo $PS1 \h:\W \u\$ still said X:~ myname$ I discovered my /etc/hostname file still thought my hostname was X. I su root, set the hostname to Y with the hostname command, restart the terminal app and then my bash shell prompt said: Y:~ myname$ All was good. Closing the terminal, I then went back to system preferences -> sharing, and set the hostname to Z. I restarted the terminal, and my prompt was back to X:~ myname$ Which was very surprising. Not only was it not what I expected, it wasn't the error I would have expected. Does anyone know how hostname is getting changed, or how to fix this problem? |
|
#2
| ||||
| ||||
| I noticed the same behaviour, which seemed to be caused by my DHCP controller (i.e., my router). I have an iBook with two interfaces (iBookEN and iBookAP for ethernet and airport respectively). I use two pipes for a complex QoS implementation. I noticed that, even though my hostname in System Preferences was iBook, it would take on the hostname given by my DHCP controller (or, more specifically, the one provided as a DHCP Client ID, given above). But, after having used two routers (a Linksys WRT54G-CA v6 with dd-wrt custom firmware and a DLink DI-624 with 2.76) I have only experienced hostname changes with the Linksys, not with the DLink.
__________________ michaelsanford.com Blog Twitter Tumblr LinkedIn iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD iMac G4 TFT 700 MHz | MacOS X 10.3.9 | 768 MB RAM, 40 GB HDD AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2120 GB RAID 1, 2500 GB RAID 0 |