[Frugalware-darcs] setup-current: netconfig: added 'start' profile as an alias of 'default'

VMiklos vmiklos at frugalware.org
Thu Mar 16 18:02:05 CET 2006


[netconfig: added 'start' profile as an alias of 'default'
VMiklos <vmiklos at frugalware.org>**20060117192257] {
hunk ./src/config/netconfig.c 32
-	printf("usage: %s [options]\n", myname);
+	printf("usage: %s [options] [profile]\n", myname);
hunk ./src/config/netconfig.c 52
+	char *profile=NULL;
hunk ./src/config/netconfig.c 75
-	if(nco_dryrun)
-		printf("running dry-run\n");
-
-	/*init_dialog(input, dialog_state.output);
-	dialog_msgbox("title", "content", 0, 0, 0);
-	end_dialog();*/
+	if(optind < argc)
+	{
+		if(!strcmp("start", argv[optind]))
+			profile = strdup("default");
+		else
+			profile = argv[optind];
+	}
+	else
+	{
+		init_dialog(input, dialog_state.output);
+		dialog_msgbox("title", "content", 0, 0, 0);
+		end_dialog();
+	}
}


More information about the Frugalware-darcs mailing list