On 2011-07-25 23:06:29 +0200, Vincent Lefevre wrote:
> I think the problem occurs under very specific conditions, since
> it does not always occur. I've just managed to reproduce it by
> doing the following:
>
> 1. I connected to the access point. No problems: hostname not changed
> (though the logs say "attempting to set hostname with dhclient").
> 2. I did a suspend/resume (my machine is a laptop).
> 3. As the wifi connection was dropped due to the suspend/resume,
> I connected again to the access point Result: the hostname has
> been set to the IP address.
>
> Note: I think when the problem occurred this morning, it was under
> the same conditions, as I suspended my laptop during the night.
I could again reproduce it under these conditions (but note that
this doesn't always happen -- perhaps the suspend time must be
large enough; here it was the full night). This time I did a
strace with:
strace -f -o strace.out -p 2324
where 2324 is the wicd-daemon.py pid. The strace output shows that
/sbin/dhclient executes /sbin/dhclient-script twice, and the second
time /sbin/dhclient-script executes /bin/hostname:
7033 execve("/bin/hostname", ["hostname", "192.168.131.22"], [/* 30 vars */])
= 0
which does the sethostname(2). Here's a part of the succession of
the execve calls:
[...]
7021 execve("/sbin/dhclient", ["/sbin/dhclient", "-v", "-cf",
"/var/lib/wicd/dhclient.conf", "wlan0"], [/* 18 vars */] <unfinished ...>
7022 execve("/sbin/dhclient-script", ["/sbin/dhclient-script"], [/* 4 vars */]
<unfinished ...>
7023 execve("/bin/run-parts", ["run-parts", "--list",
"/etc/dhcp/dhclient-enter-hooks.d"], [/* 6 vars */]) = 0
7024 execve("/usr/sbin/avahi-autoipd", ["/usr/sbin/avahi-autoipd", "-k",
"wlan0"], [/* 6 vars */]) = 0
7025 execve("/sbin/ip", ["ip", "link", "set", "dev", "wlan0", "up"], [/* 6
vars */]) = 0
7026 execve("/bin/run-parts", ["run-parts", "--list",
"/etc/dhcp/dhclient-exit-hooks.d"], [/* 6 vars */]) = 0
7030 execve("/sbin/dhclient-script", ["/sbin/dhclient-script"], [/* 28 vars
*/] <unfinished ...>
7031 execve("/bin/run-parts", ["run-parts", "--list",
"/etc/dhcp/dhclient-enter-hooks.d"], [/* 30 vars */]) = 0
7032 execve("/usr/sbin/avahi-autoipd", ["/usr/sbin/avahi-autoipd", "-k",
"wlan0"], [/* 30 vars */] <unfinished ...>
7033 execve("/bin/hostname", ["hostname", "192.168.131.22"], [/* 30 vars */])
= 0
[...]
--
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]