8 int listconfig(struct gconffile **cf, char *block, int compact) {
9 char *opt = NULL, *val = NULL;
15 if (!getconfigline(cf, block, &opt, &val, &conftype))
18 return 0; /* Success. */
20 if (conftype == CONF_STR && !strcasecmp(opt, "include")) {
21 if (!pushgconfpaths(cf, val))
22 debugx(1, DBG_ERR, "failed to include config file %s", val);
29 printf(compact ? "%s=%s;" : "\t%s=%s\n", opt, val);
31 printf("%s=%s\n", opt, val);
34 printf("%s %s {%s", opt, val, compact ? "" : "\n");
35 if (listconfig(cf, val, compact))
40 printf("Unsupported config type\n");
45 return 0; /* Success. */
48 int main(int argc, char **argv) {
50 struct gconffile *cfs;
52 debug_init("radsecproxy-conf");
53 debug_set_level(DBG_WARN);
55 while ((c = getopt(argc, argv, "c")) != -1) {
64 if (argc - optind != 1)
67 cfs = openconfigfile(argv[optind]);
68 return listconfig(&cfs, NULL, compact);
71 debug(DBG_ERR, "Usage:\n%s [ -c ] configfile", argv[0]);
75 /* Local Variables: */
76 /* c-file-style: "stroustrup" */