annotate src/config/settings-get.pl @ 22656:1789bf2a1e01

director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 05 Nov 2017 23:51:56 +0200
parents 0dc214cf2e30
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #!/usr/bin/env perl
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 use strict;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 print '#include "lib.h"'."\n";
9011
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
5 print '#include "array.h"'."\n";
13060
99da5f4f375d master: Fail at startup if default_login_user or default_internal_user doesn't exist.
Timo Sirainen <tss@iki.fi>
parents: 12312
diff changeset
6 print '#include "ipwd.h"'."\n";
9177
e4cc93190ec3 Moved pop3_uidl_format checking to mail-storage-settings.
Timo Sirainen <tss@iki.fi>
parents: 9159
diff changeset
7 print '#include "var-expand.h"'."\n";
9434
e374a365521d Initial commit for making mail_storage:mailbox_list to be from 1:1 to n:n.
Timo Sirainen <tss@iki.fi>
parents: 9179
diff changeset
8 print '#include "file-lock.h"'."\n";
11634
7f19062f58fd Renamed fsync_disable to mail_fsync=optimized|always|never.
Timo Sirainen <tss@iki.fi>
parents: 11007
diff changeset
9 print '#include "fsync-mode.h"'."\n";
12312
28eaaa23f2c6 lib-storage: Added support for saving mail attachments separately via filesystem API.
Timo Sirainen <tss@iki.fi>
parents: 11634
diff changeset
10 print '#include "hash-format.h"'."\n";
15187
02451e967a06 Renamed network.[ch] to net.[ch].
Timo Sirainen <tss@iki.fi>
parents: 14159
diff changeset
11 print '#include "net.h"'."\n";
13793
ee783a878120 Moved autocreate plugin functionality into lib-storage.
Timo Sirainen <tss@iki.fi>
parents: 13060
diff changeset
12 print '#include "unichar.h"'."\n";
20419
0dc214cf2e30 auth-policy: Add policy implementation
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19920
diff changeset
13 print '#include "hash-method.h"'."\n";
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 print '#include "settings-parser.h"'."\n";
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
15 print '#include "all-settings.h"'."\n";
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
16 print '#include <stddef.h>'."\n";
9011
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
17 print '#include <unistd.h>'."\n";
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
18 print '#define CONFIG_BINARY'."\n";
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
19 print 'extern buffer_t config_all_services_buf;';
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
21 my @services = ();
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
22 my @service_ifdefs = ();
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23 my %parsers = {};
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 foreach my $file (@ARGV) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
26 my $f;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27 open($f, $file) || die "Can't open $file: $@";
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29 my $state = 0;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30 my $file_contents = "";
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31 my $externs = "";
9011
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
32 my $code = "";
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
33 my %funcs;
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
34 my $cur_name = "";
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
35 my $ifdef = "";
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
36 my $state_ifdef = 0;
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
37
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
38 while (<$f>) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
39 my $write = 0;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
40 if ($state == 0) {
19920
c1b70b76f9bb config: Escape regexps properly in settings-get.pl to avoid warnings with new Perl
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 17397
diff changeset
41 if (/struct .*_settings \{/ ||
c1b70b76f9bb config: Escape regexps properly in settings-get.pl to avoid warnings with new Perl
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 17397
diff changeset
42 /struct setting_define.*\{/ ||
c1b70b76f9bb config: Escape regexps properly in settings-get.pl to avoid warnings with new Perl
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 17397
diff changeset
43 /struct .*_default_settings = \{/) {
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
44 $state++;
19920
c1b70b76f9bb config: Escape regexps properly in settings-get.pl to avoid warnings with new Perl
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 17397
diff changeset
45 } elsif (/^struct service_settings (.*) = \{/) {
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
46 $state++;
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
47 if ($ifdef eq "") {
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
48 $state_ifdef = 0;
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
49 } else {
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
50 $_ = $ifdef."\n".$_;
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
51 $state_ifdef = 1;
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
52 }
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
53 push @services, $1;
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
54 push @service_ifdefs, $ifdef;
19920
c1b70b76f9bb config: Escape regexps properly in settings-get.pl to avoid warnings with new Perl
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 17397
diff changeset
55 } elsif (/^(static )?const struct setting_parser_info (.*) = \{/) {
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
56 $cur_name = $2;
10177
d589d568a19d Changed all settings related structs to const and changed APIs to make it work.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
57 $state++ if ($cur_name !~ /^\*default_/);
d589d568a19d Changed all settings related structs to const and changed APIs to make it work.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
58 } elsif (/^extern const struct setting_parser_info (.*);/) {
d589d568a19d Changed all settings related structs to const and changed APIs to make it work.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
59 $externs .= "extern const struct setting_parser_info $1;\n";
9011
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
60 } elsif (/\/\* <settings checks> \*\//) {
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
61 $state = 4;
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
62 $code .= $_;
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
63 }
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
64
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
65 if (/(^#ifdef .*)$/ || /^(#if .*)$/) {
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
66 $ifdef = $1;
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
67 } else {
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
68 $ifdef = "";
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
69 }
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
70
9159
6324a79d3ee1 Initial commit for v2.0 master rewrite. Several features are still missing.
Timo Sirainen <tss@iki.fi>
parents: 9011
diff changeset
71 if (/#define.*DEF/ || /^#undef.*DEF/ || /ARRAY_DEFINE_TYPE.*_settings/) {
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
72 $write = 1;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
73 $state = 2 if (/\\$/);
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
74 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
75 } elsif ($state == 2) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
76 $write = 1;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
77 $state = 0 if (!/\\$/);
9011
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
78 } elsif ($state == 4) {
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
79 $code .= $_;
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
80 $state = 0 if (/\/\* <\/settings checks> \*\//);
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
81 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
82
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
83 if ($state == 1 || $state == 3) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
84 if ($state == 1) {
10411
3448f1bc6966 Changed settings-get.pl to understand the MEMBER() macro removal.
Timo Sirainen <tss@iki.fi>
parents: 10336
diff changeset
85 if (/\.module_name = "(.*)"/) {
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
86 $parsers{$cur_name} = $1;
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
87 }
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
88 if (/DEFLIST.*".*",(.*)$/) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
89 my $value = $1;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
90 if ($value =~ /.*&(.*)\)/) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
91 $parsers{$1} = 0;
10177
d589d568a19d Changed all settings related structs to const and changed APIs to make it work.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
92 $externs .= "extern const struct setting_parser_info $1;\n";
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
93 } else {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
94 $state = 3;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
95 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
96 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
97 } elsif ($state == 3) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
98 if (/.*&(.*)\)/) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
99 $parsers{$1} = 0;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
100 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
101 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
102
10336
e18645b47984 config: Allow settings plugins to specify also new default services.
Timo Sirainen <tss@iki.fi>
parents: 10181
diff changeset
103 s/^static const (struct master_settings master_default_settings)/$1/;
e18645b47984 config: Allow settings plugins to specify also new default services.
Timo Sirainen <tss@iki.fi>
parents: 10181
diff changeset
104
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
105 $write = 1;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
106 if (/};/) {
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
107 $state = 0;
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
108 if ($state_ifdef) {
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
109 $_ .= "#endif\n";
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
110 $state_ifdef = 0;
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
111 }
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
112 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
113 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
114
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
115 $file_contents .= $_ if ($write);
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
116 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
117
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
118 print "/* $file */\n";
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
119 print $externs;
9011
c37f7113b1ee doveconf now checks that all settings are ok by calling check functions.
Timo Sirainen <tss@iki.fi>
parents: 9002
diff changeset
120 print $code;
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
121 print $file_contents;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
122
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
123 close $f;
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
124 }
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
125
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
126 print "static struct service_settings *config_all_services[] = {\n";
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
127
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
128 for (my $i = 0; $i < scalar(@services); $i++) {
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
129 my $ifdef = $service_ifdefs[$i];
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
130 print "$ifdef\n" if ($ifdef ne "");
11007
2178c4569f38 config: Fixed all-settings building script.
Timo Sirainen <tss@iki.fi>
parents: 10986
diff changeset
131 print "\t&".$services[$i].",\n";
10986
b218d4ec6996 config: Parser script now supports preserving #ifdefs around service_settings.
Timo Sirainen <tss@iki.fi>
parents: 10411
diff changeset
132 print "#endif\n" if ($ifdef ne "");
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
133 }
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
134 print "};\n";
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
135 print "buffer_t config_all_services_buf = {\n";
17397
f373df52082a treewide - mass cleanup of 0 used to end a settings list
Phil Carmody <phil@dovecot.fi>
parents: 15213
diff changeset
136 print "\tconfig_all_services, sizeof(config_all_services), { NULL, }\n";
10179
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
137 print "};\n";
afe52d60989c Moved default service settings from master.conf to source code.
Timo Sirainen <tss@iki.fi>
parents: 10177
diff changeset
138
10181
4dc080520769 config: Added support for dynamically loaded settings.
Timo Sirainen <tss@iki.fi>
parents: 10179
diff changeset
139 print "const struct setting_parser_info *all_default_roots[] = {\n";
15213
78749ae0c9c2 config: Added lib-master's settings parsers back to config's knowledge
Timo Sirainen <tss@iki.fi>
parents: 15187
diff changeset
140 print "\t&master_service_setting_parser_info,\n";
78749ae0c9c2 config: Added lib-master's settings parsers back to config's knowledge
Timo Sirainen <tss@iki.fi>
parents: 15187
diff changeset
141 print "\t&master_service_ssl_setting_parser_info,\n";
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
142 foreach my $name (keys %parsers) {
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
143 my $module = $parsers{$name};
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
144 next if (!$module);
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
145
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
146 print "\t&".$name.", \n";
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
147 }
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
148 print "\tNULL\n";
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
149 print "};\n";
10181
4dc080520769 config: Added support for dynamically loaded settings.
Timo Sirainen <tss@iki.fi>
parents: 10179
diff changeset
150 print "const struct setting_parser_info *const *all_roots = all_default_roots;\n";
10336
e18645b47984 config: Allow settings plugins to specify also new default services.
Timo Sirainen <tss@iki.fi>
parents: 10181
diff changeset
151 print "ARRAY_TYPE(service_settings) *default_services = &master_default_settings.services;\n";