From 3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 3 Jun 2005 08:39:13 +0000 Subject: write DHCP_HOSTNAME in /tmp/ifcfg-* file instead of /tmp/network --- mdk-stage1/network.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 8bdb2f480..29ea5dc10 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -287,9 +287,6 @@ static int save_netinfo(struct interface_info * intf) if (hostname && !intf->boot_proto == BOOTPROTO_DHCP) fprintf(f, "HOSTNAME=%s\n", hostname); - if (dhcp_hostname && !streq(dhcp_hostname, "")) - fprintf(f, "DHCP_HOSTNAME=%s\n", dhcp_hostname); - if (gateway.s_addr != 0) fprintf(f, "GATEWAY=%s\n", inet_ntoa(gateway)); @@ -307,9 +304,11 @@ static int save_netinfo(struct interface_info * intf) fprintf(f, "DEVICE=%s\n", intf->device); - if (intf->boot_proto == BOOTPROTO_DHCP) + if (intf->boot_proto == BOOTPROTO_DHCP) { fprintf(f, "BOOTPROTO=dhcp\n"); - else if (intf->boot_proto == BOOTPROTO_STATIC) { + if (dhcp_hostname && !streq(dhcp_hostname, "")) + fprintf(f, "DHCP_HOSTNAME=%s\n", dhcp_hostname); + } else if (intf->boot_proto == BOOTPROTO_STATIC) { fprintf(f, "BOOTPROTO=static\n"); fprintf(f, "IPADDR=%s\n", inet_ntoa(intf->ip)); fprintf(f, "NETMASK=%s\n", inet_ntoa(intf->netmask)); -- cgit v1.2.1