Browse Source

Change hotplug configuration as written to interface file

r32494
tags/1.18
Frans Pop 16 years ago
parent
commit
6213e7206d
4 changed files with 12 additions and 2 deletions
  1. +7
    -1
      debian/changelog
  2. +2
    -0
      dhcp.c
  3. +1
    -1
      netcfg-common.c
  4. +2
    -0
      static.c

+ 7
- 1
debian/changelog View File

@@ -1,9 +1,15 @@
netcfg (1.18) UNRELEASED; urgency=low

[ Joey Hess ]
* Make netcfg-static use the same menu item number as netcfg, no reason for
it to differ.

-- Joey Hess <joeyh@debian.org> Fri, 18 Nov 2005 15:18:52 -0500
[ Frans Pop ]
* Change hotplug configuration as written to interface file. This new
syntax is supported by both udev and hotplug (from 0.0.20040329-25).
Closes: #340935.

-- Frans Pop <fjp@debian.org> Mon, 28 Nov 2005 15:38:25 +0100

netcfg (1.17) unstable; urgency=low



+ 2
- 0
dhcp.c View File

@@ -37,6 +37,8 @@ static void netcfg_write_dhcp (char *iface, char *dhostname)
fprintf(fp, "\n# The primary network interface\n");
if (!iface_is_hotpluggable(iface) && !find_in_stab(iface))
fprintf(fp, "auto %s\n", iface);
else
fprintf(fp, "allow-hotplug %s\n", iface);
fprintf(fp, "iface %s inet dhcp\n", iface);
if (dhostname)
{


+ 1
- 1
netcfg-common.c View File

@@ -710,7 +710,7 @@ void netcfg_write_common(struct in_addr ipaddress, char *hostname, char *domain)
fprintf(fp, "# This is a list of hotpluggable network interfaces.\n");
fprintf(fp, "# They will be activated automatically by the "
"hotplug subsystem.\n");
fprintf(fp, "mapping hotplug\n");
fprintf(fp, "mapping eth0\n");
fprintf(fp, "\tscript grep\n");
fprintf(fp, "\tmap %s\n", interface);
}


+ 2
- 0
static.c View File

@@ -191,6 +191,8 @@ static int netcfg_write_static(char *domain, struct in_addr nameservers[])
fprintf(fp, "\n# The primary network interface\n");
if (!iface_is_hotpluggable(interface) && !find_in_stab(interface))
fprintf(fp, "auto %s\n", interface);
else
fprintf(fp, "allow-hotplug %s\n", interface);
fprintf(fp, "iface %s inet static\n", interface);
fprintf(fp, "\taddress %s\n", inet_ntop (AF_INET, &ipaddress, ptr1, sizeof (ptr1)));
fprintf(fp, "\tnetmask %s\n", inet_ntop (AF_INET, &netmask, ptr1, sizeof (ptr1)));


Loading…
Cancel
Save