Skip to content

Commit

Permalink
Revert "[modesetting] Set up network after post services have run"
Browse files Browse the repository at this point in the history
Reverting as this does not work with services that need to have
the network up.

This reverts commit befb95a.
  • Loading branch information
philippedeswert committed Jul 2, 2015
1 parent 32776a5 commit 54b10a6
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/usb_moded-modesetting.c
Expand Up @@ -367,22 +367,11 @@ int set_dynamic_mode(void)
ret = write_to_file(data->softconnect_path, data->softconnect);
}

/* Needs to be called before application post synching so
that the dhcp server has the right config */
if(data->nat || data->dhcp_server)
ret = usb_network_set_up_dhcpd(data);

#ifdef APP_SYNC
/* no need to execute the post sync if there was an error setting the mode */
if(data->appsync && !ret)
activate_sync_post(data->mode_name);
#endif

/* functionality should be enabled, so we can enable the network now */
if(data->network)
{
#ifdef DEBIAN
char command[256];
char command[256];

g_snprintf(command, 256, "ifdown %s ; ifup %s", data->network_interface, data->network_interface);
system(command);
Expand All @@ -392,6 +381,15 @@ int set_dynamic_mode(void)
#endif /* DEBIAN */
}

/* Needs to be called before application post synching so
that the dhcp server has the right config */
if(data->nat || data->dhcp_server)
ret = usb_network_set_up_dhcpd(data);

/* no need to execute the post sync if there was an error setting the mode */
if(data->appsync && !ret)
activate_sync_post(data->mode_name);

#ifdef CONNMAN
if(data->connman_tethering)
connman_set_tethering(data->connman_tethering, TRUE);
Expand Down

0 comments on commit 54b10a6

Please sign in to comment.