maximilian attems
2006-Jul-07 01:15 UTC
[klibc] [patch] ipconfig set hostname from dhcpd server
based on a patch by bdb at forbidden.co.uk, see http://bugs.debian.org/377144 Signed-off-by: maximilian attems <maks at sternwelten.at> diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c index c9d3b0e..3afd7c9 100644 --- a/usr/kinit/ipconfig/main.c +++ b/usr/kinit/ipconfig/main.c @@ -87,6 +87,10 @@ static void configure_device(struct netd if (netdev_setdefaultroute(dev)) printf("IP-Config: failed to set default route on %s\n", dev->name); + if (dev->hostname[0] && + sethostname(dev->hostname, strlen(dev->hostname))) + printf("IP-Config: failed to set hostname '%s' from %s\n", + dev->hostname, dev->name); } static void dump_device_config(struct netdev *dev) -- maks