Browse Source

port some wireless fixes backward

r15240
master
Joshua Kwan 18 years ago
parent
commit
d4f6e2ab02
  1. 2
      debian/changelog
  2. 14
      netcfg-dhcp.c
  3. 14
      netcfg-static.c

2
debian/changelog

@ -2,6 +2,8 @@ netcfg (0.64) UNRELEASED; urgency=low
* Joshua Kwan
- Split out all functions into static.c, dhcp.c, wireless.c.
- Port wireless fixes back to netcfg-static and netcfg-dhcp, which
have been rather neglected lately.
- Redesign DHCP strategy with a new template that uses a select,
allowing the user to clearly alternate to static network config
(Closes: #244901, #227722)

14
netcfg-dhcp.c

@ -39,6 +39,7 @@ int main(void)
{
int num_interfaces;
static struct debconfclient *client;
static int requested_wireless_tools = 0;
enum { BACKUP, GET_INTERFACE, WCONFIG, QUIT } state = GET_INTERFACE;
@ -67,12 +68,21 @@ int main(void)
}
break;
case WCONFIG:
if (netcfg_wireless_set_essid (client, interface)
|| netcfg_wireless_set_wep (client, interface))
if (requested_wireless_tools == 0)
{
requested_wireless_tools = 1;
di_exec_shell("apt-install wireless-tools");
}
if (netcfg_wireless_set_essid (client, interface))
{
state = BACKUP;
break;
}
if (netcfg_wireless_set_wep (client, interface))
{
state = BACKUP;
break;
}
state = QUIT;
break;
case QUIT:

14
netcfg-static.c

@ -36,6 +36,7 @@ int main(void)
{
int num_interfaces = 0;
static struct debconfclient *client;
static int requested_wireless_tools = 0;
enum { BACKUP, GET_INTERFACE, GET_STATIC, WCONFIG, QUIT} state = GET_INTERFACE;
@ -69,12 +70,21 @@ int main(void)
state = QUIT;
break;
case WCONFIG:
if (netcfg_wireless_set_essid (client, interface)
|| netcfg_wireless_set_wep (client, interface))
if (requested_wireless_tools == 0)
{
requested_wireless_tools = 1;
di_exec_shell("apt-install wireless-tools");
}
if (netcfg_wireless_set_essid (client, interface))
{
state = BACKUP;
break;
}
if (netcfg_wireless_set_wep (client, interface))
{
state = BACKUP;
break;
}
state = GET_STATIC;
break;
case QUIT:

Loading…
Cancel
Save