summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/network.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-26 16:47:13 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-26 16:47:13 +0000
commit793181529812128f5c570df1c055e17385ae9bd5 (patch)
tree68b84464aa072fb9bd4cbc78f1d4abb26572698e /mdk-stage1/network.c
parent2401671895ff60401e8169601fe907455392bcd6 (diff)
downloaddrakx-793181529812128f5c570df1c055e17385ae9bd5.tar
drakx-793181529812128f5c570df1c055e17385ae9bd5.tar.gz
drakx-793181529812128f5c570df1c055e17385ae9bd5.tar.bz2
drakx-793181529812128f5c570df1c055e17385ae9bd5.tar.xz
drakx-793181529812128f5c570df1c055e17385ae9bd5.zip
try to not save the hostname answered by the dhcp server
Diffstat (limited to 'mdk-stage1/network.c')
-rw-r--r--mdk-stage1/network.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index ef9dd2814..e6df5ac52 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -466,9 +466,10 @@ static enum return_type configure_network(struct interface_info * intf)
dnshostname = mygethostbyaddr(inet_ntoa(intf->ip));
if (dnshostname) {
- hostname = strdup(dnshostname);
+ if (intf->boot_proto == BOOTPROTO_STATIC)
+ hostname = strdup(dnshostname);
domain = strchr(strdup(hostname), '.') + 1;
- log_message("got hostname and domain from dns entry, %s and %s", hostname, domain);
+ log_message("got hostname and domain from dns entry, %s and %s", dnshostname, domain);
return RETURN_OK;
}