[Frugalware-darcs] setup-current: netconfig: step 1: shut down the
interfaces
VMiklos
vmiklos at frugalware.org
Thu Mar 16 18:02:09 CET 2006
[netconfig: step 1: shut down the interfaces
VMiklos <vmiklos at frugalware.org>**20060117235956] {
hunk ./src/config/netconfig.c 34
+int nc_system(const char *cmd)
+{
+ if(nco_dryrun)
+ return(printf("%s\n", cmd));
+ else
+ return(system(cmd));
+}
+
hunk ./src/config/netconfig.c 106
- printf("new line: %s\n", line);
hunk ./src/config/netconfig.c 204
- char *fn=NULL;
+ char *fn=NULL, *ptr;
+ int i;
hunk ./src/config/netconfig.c 207
+ interface_t *iface;
hunk ./src/config/netconfig.c 238
+ if(profile==NULL)
+ return(1);
+ // step 1: shut down the interfaces
+ for (i=0; i<g_list_length(profile->interfaces); i++)
+ {
+ ptr = g_strdup_printf("ifconfig %s down", (char*)g_list_nth_data(profile->interfaces, i));
+ nc_system(ptr);
+ free(ptr);
+ }
}
More information about the Frugalware-darcs
mailing list