diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-06-03 08:39:13 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-06-03 08:39:13 +0000 |
commit | 3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d (patch) | |
tree | 80b6ae1ab0d63c13756ec6f71cae4f7594d1eda3 /mdk-stage1 | |
parent | 5ea29007e8fe97bb22d83f938bf85ebebce7e61b (diff) | |
download | drakx-3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d.tar drakx-3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d.tar.gz drakx-3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d.tar.bz2 drakx-3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d.tar.xz drakx-3d5bee4c7882287b6ec06b0ca2b9d135c614cf5d.zip |
write DHCP_HOSTNAME in /tmp/ifcfg-* file instead of /tmp/network
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/network.c | 9 |
1 files 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)); |