* August 4, 2004 Allan Nathanson <ajn@apple.com>
* - added network configuration (prefs) support
*
* August 4, 2004 Allan Nathanson <ajn@apple.com>
* - added network configuration (prefs) support
*
__private_extern__ InputRef currentInput = NULL;
__private_extern__ int nesting = 0;
__private_extern__ CFRunLoopRef notifyRl = NULL;
__private_extern__ InputRef currentInput = NULL;
__private_extern__ int nesting = 0;
__private_extern__ CFRunLoopRef notifyRl = NULL;
{ "get", required_argument, NULL, 0 },
{ "help", no_argument, NULL, '?' },
{ "net", no_argument, NULL, 0 },
{ "get", required_argument, NULL, 0 },
{ "help", no_argument, NULL, '?' },
{ "net", no_argument, NULL, 0 },
{ "proxy", no_argument, NULL, 0 },
{ "set", required_argument, NULL, 0 },
{ NULL, 0, NULL, 0 }
{ "proxy", no_argument, NULL, 0 },
{ "set", required_argument, NULL, 0 },
{ NULL, 0, NULL, 0 }
SCPrint(TRUE, stderr, CFSTR("usage: %s\n"), command);
SCPrint(TRUE, stderr, CFSTR("\tinteractive access to the dynamic store.\n"));
SCPrint(TRUE, stderr, CFSTR("\n"));
SCPrint(TRUE, stderr, CFSTR("usage: %s\n"), command);
SCPrint(TRUE, stderr, CFSTR("\tinteractive access to the dynamic store.\n"));
SCPrint(TRUE, stderr, CFSTR("\n"));
+ SCPrint(TRUE, stderr, CFSTR(" or: %s --prefs\n"), command);
+ SCPrint(TRUE, stderr, CFSTR("\tinteractive access to the [raw] stored preferences.\n"));
+ SCPrint(TRUE, stderr, CFSTR("\n"));
SCPrint(TRUE, stderr, CFSTR(" or: %s -r nodename\n"), command);
SCPrint(TRUE, stderr, CFSTR(" or: %s -r address\n"), command);
SCPrint(TRUE, stderr, CFSTR(" or: %s -r local-address remote-address\n"), command);
SCPrint(TRUE, stderr, CFSTR(" or: %s -r nodename\n"), command);
SCPrint(TRUE, stderr, CFSTR(" or: %s -r address\n"), command);
SCPrint(TRUE, stderr, CFSTR(" or: %s -r local-address remote-address\n"), command);
SCPrint(TRUE, stderr, CFSTR(" or: %s --set pref [newval]\n"), command);
SCPrint(TRUE, stderr, CFSTR("\tpref\tdisplay (or set) the specified preference. Valid preferences\n"));
SCPrint(TRUE, stderr, CFSTR("\t\tinclude:\n"));
SCPrint(TRUE, stderr, CFSTR(" or: %s --set pref [newval]\n"), command);
SCPrint(TRUE, stderr, CFSTR("\tpref\tdisplay (or set) the specified preference. Valid preferences\n"));
SCPrint(TRUE, stderr, CFSTR("\t\tinclude:\n"));
- SCPrint(TRUE, stderr, CFSTR("\t\t\tComputerName, LocalHostName\n"));
+ SCPrint(TRUE, stderr, CFSTR("\t\t\tComputerName, LocalHostName, HostName\n"));
SCPrint(TRUE, stderr, CFSTR("\tnewval\tNew preference value to be set. If not specified,\n"));
SCPrint(TRUE, stderr, CFSTR("\t\tthe new value will be read from standard input.\n"));
SCPrint(TRUE, stderr, CFSTR("\n"));
SCPrint(TRUE, stderr, CFSTR("\tnewval\tNew preference value to be set. If not specified,\n"));
SCPrint(TRUE, stderr, CFSTR("\t\tthe new value will be read from standard input.\n"));
SCPrint(TRUE, stderr, CFSTR("\n"));
xStore++;
} else if (strcmp(longopts[opti].name, "get") == 0) {
get = optarg;
xStore++;
} else if (strcmp(longopts[opti].name, "net") == 0) {
xStore++;
} else if (strcmp(longopts[opti].name, "get") == 0) {
get = optarg;
xStore++;
} else if (strcmp(longopts[opti].name, "net") == 0) {
do_net_init(); /* initialization */
do_net_open(0, NULL); /* open default prefs */
do_net_init(); /* initialization */
do_net_open(0, NULL); /* open default prefs */
+ } else if (doPrefs) {
+ /* if we are going to be managing the network configuration */
+ commands = (cmdInfo *)commands_prefs;
+ nCommands = nCommands_prefs;
+
+ do_dictInit(0, NULL); /* start with an empty dictionary */
+ do_prefs_init(); /* initialization */
+ do_prefs_open(0, NULL); /* open default prefs */