Commit 873d80eb authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[-feature] Made paths in documentation symbolic.

parent 1fb5e0c7
......@@ -15,7 +15,7 @@ set for service messages sent by Sympa. If you want to enable legacy character
set support, simply copy sample F<charset.conf> onto configuration
directory:
# cp --defaultdir--/charset.conf --sysconfdir--/charset.conf
# cp $DEFAULTDIR/charset.conf $SYSCONFDIR/charset.conf
And set the C<legacy_character_support_feature> parameter value in
F<--CONFIG--> to C<on>.
......
......@@ -12,9 +12,11 @@ my $parameters = '';
my $first_section = 1;
foreach my $param (@Sympa::ConfDef::params) {
if (exists $param->{'name'}) {
my $name = $param->{'name'};
my $default = $param->{'default'}
if exists $param->{'default'};
my $name = $param->{'name'};
my $default =
(exists $param->{'default_s'}) ? $param->{'default_s'}
: (exists $param->{'default'}) ? $param->{'default'}
: undef;
my $query = $param->{'gettext_id'}
if exists $param->{'gettext_id'};
my $advice = $param->{'gettext_comment'}
......@@ -65,9 +67,8 @@ foreach my $param (@Sympa::ConfDef::params) {
}
#$parameters .= "=back\n\n" unless $first_section;
printf do { local $RS; <DATA> }, Sympa::Constants::CONFIG(),
$parameters,
Sympa::Constants::CONFIG(), Sympa::Constants::SYSCONFDIR();
printf do { local $RS; <DATA> }, Sympa::Constants::CONFIG(), $parameters,
Sympa::Constants::CONFIG();
exit 0;
......@@ -123,7 +124,7 @@ For more details of each parameter see Reference Manual.
Sympa main configuration file.
=item F<%s/E<lt>robot nameE<gt>/robot.conf>
=item F<$SYSCONFDIR/E<lt>robot nameE<gt>/robot.conf>
Configuration specific to each virtual host.
......
......@@ -281,8 +281,8 @@ our @params = (
'optional' => '1',
'vhost' => '1',
},
{ 'name' => 'static_content_path',
'default' => Sympa::Constants::STATICDIR,
{ 'name' => 'static_content_path',
'default_s' => '$STATICDIR',
'gettext_id' =>
'Directory for storing static contents (CSS, members pictures, documentation) directly delivered by HTTP server',
'vhost' => '1',
......@@ -349,13 +349,13 @@ our @params = (
{'gettext_id' => 'Directories'},
{ 'name' => 'home',
'default' => Sympa::Constants::EXPLDIR,
'default_s' => '$EXPLDIR',
'gettext_id' => 'Directory containing mailing lists subdirectories',
'file' => 'sympa.conf',
'edit' => '1',
},
{ 'name' => 'etc',
'default' => Sympa::Constants::SYSCONFDIR,
{ 'name' => 'etc',
'default_s' => '$SYSCONFDIR',
'gettext_id' =>
'Directory for configuration files; it also contains scenari/ and templates/ directories',
'file' => 'sympa.conf',
......@@ -526,15 +526,15 @@ our @params = (
'Max. number of different domains per call to Sendmail',
'file' => 'sympa.conf',
},
{ 'name' => 'alias_manager',
'default' => Sympa::Constants::SBINDIR . '/alias_manager.pl',
{ 'name' => 'alias_manager',
'default_s' => '$SBINDIR/alias_manager.pl',
},
{ 'name' => 'db_list_cache',
'default' => 'off',
'gettext_comment' => 'Whether or not to cache lists in the database',
},
{ 'name' => 'sendmail_aliases',
'default' => Sympa::Constants::SENDMAIL_ALIASES,
{ 'name' => 'sendmail_aliases',
'default_s' => '$SENDMAIL_ALIASES',
'gettext_id' =>
'Path of the file that contains all list related aliases',
'vhost' => '1',
......@@ -688,13 +688,13 @@ our @params = (
{'gettext_id' => 'Spool related'},
{ 'name' => 'spool',
'default' => Sympa::Constants::SPOOLDIR,
'default_s' => '$SPOOLDIR',
'gettext_id' => 'Directory containing various specialized spools',
'file' => 'sympa.conf',
'gettext_comment' => 'All spool are created at runtime by sympa.pl',
},
{ 'name' => 'queue',
'default' => Sympa::Constants::SPOOLDIR . '/msg',
'default_s' => '$SPOOLDIR/msg',
'gettext_id' => 'Directory for message incoming spool',
'file' => 'sympa.conf',
},
......@@ -703,53 +703,53 @@ our @params = (
# 'file' => 'sympa.conf',
# },
{ 'name' => 'queuemod',
'default' => Sympa::Constants::SPOOLDIR . '/moderation',
'default_s' => '$SPOOLDIR/moderation',
'gettext_id' => 'Directory for moderation spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queuedigest',
'default' => Sympa::Constants::SPOOLDIR . '/digest',
'default_s' => '$SPOOLDIR/digest',
'gettext_id' => 'Directory for digest spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queueauth',
'default' => Sympa::Constants::SPOOLDIR . '/auth',
'default_s' => '$SPOOLDIR/auth',
'gettext_id' => 'Directory for authentication spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queueoutgoing',
'default' => Sympa::Constants::SPOOLDIR . '/outgoing',
'default_s' => '$SPOOLDIR/outgoing',
'gettext_id' => 'Directory for archive spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queuesubscribe',
'default' => Sympa::Constants::SPOOLDIR . '/subscribe',
'default_s' => '$SPOOLDIR/subscribe',
'gettext_id' => 'Directory for subscription spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queuetopic',
'default' => Sympa::Constants::SPOOLDIR . '/topic',
'default_s' => '$SPOOLDIR/topic',
'gettext_id' => 'Directory for topic spool',
'file' => 'sympa.conf',
},
##{ queuesignoff: not yet implemented. },
{ 'name' => 'queuebounce',
'default' => Sympa::Constants::SPOOLDIR . '/bounce',
'default_s' => '$SPOOLDIR/bounce',
'gettext_id' => 'Directory for bounce incoming spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queuetask',
'default' => Sympa::Constants::SPOOLDIR . '/task',
'default_s' => '$SPOOLDIR/task',
'gettext_id' => 'Directory for task spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queueautomatic',
'default' => Sympa::Constants::SPOOLDIR . '/automatic',
'default_s' => '$SPOOLDIR/automatic',
'gettext_id' => 'Directory for automatic list creation spool',
'file' => 'sympa.conf',
},
{ 'name' => 'queuebulk',
'default' => Sympa::Constants::SPOOLDIR . '/bulk',
'default_s' => '$SPOOLDIR/bulk',
'gettext_id' => 'Directory for message outgoing spool',
'file' => 'sympa.conf',
},
......@@ -757,13 +757,13 @@ our @params = (
'default' => '5',
'gettext_comment' => 'Must not be 0.',
},
{ 'name' => 'tmpdir',
'default' => Sympa::Constants::SPOOLDIR . '/tmp',
{ 'name' => 'tmpdir',
'default_s' => '$SPOOLDIR/tmp',
'gettext_id' =>
'Temporary directory used by antivirus plugins, MHonArc etc.',
},
{ name => 'viewmail_dir',
default => Sympa::Constants::SPOOLDIR . '/viewmail',
{ name => 'viewmail_dir',
'default_s' => '$SPOOLDIR/viewmail',
'gettext_id' =>
'Directory containing HTML file generated by MHonArc while displaying messages other than archives',
file => 'sympa.conf',
......@@ -866,7 +866,7 @@ our @params = (
'default' => '-owner',
},
{ 'name' => 'bounce_path',
'default' => Sympa::Constants::BOUNCEDIR,
'default_s' => '$BOUNCEDIR',
'gettext_id' => 'Directory for storing bounces',
'file' => 'wwsympa.conf',
'gettext_comment' => 'Better if not in a critical partition',
......@@ -1185,7 +1185,7 @@ our @params = (
# 'file' => 'sympa.conf',
#},
{ 'name' => 'ssl_cert_dir',
'default' => Sympa::Constants::EXPLDIR . '/X509-user-certs',
'default_s' => '$EXPLDIR/X509-user-certs',
'gettext_id' => 'Directory containing user certificates',
'file' => 'sympa.conf',
},
......@@ -1359,7 +1359,7 @@ our @params = (
{'gettext_id' => 'Web interface parameters'},
{ 'name' => 'arc_path',
'default' => Sympa::Constants::ARCDIR,
'default_s' => '$ARCDIR',
'gettext_id' => 'Directory for storing HTML archives',
'file' => 'wwsympa.conf',
'edit' => '1',
......@@ -1577,6 +1577,24 @@ our @params = (
## },
);
_apply_defaults();
sub _apply_defaults {
foreach my $param (@params) {
next unless exists $param->{default_s};
my $default = $param->{default_s};
$default =~ s{\$(\w\w+)}{
my $func = Sympa::Constants->can($1);
die sprintf 'Can\'t locate object method "%s" via package "%s"',
$1, 'Sympa::Constants'
unless $func;
$func->()
}eg;
$param->{default} = $default;
}
}
1;
__END__
......
......@@ -318,7 +318,7 @@ domain I<domain>.
=head1 FILES
F<--SENDMAIL_ALIASES--> sendmail aliases file.
F<$SENDMAIL_ALIASES> sendmail aliases file.
=head1 DOCUMENTATION
......
......@@ -277,13 +277,13 @@ Print this help message.
=head1 FILES
F<--spooldir--/outgoing/> outgoing Sympa directory.
F<$SPOOLDIR/outgoing/> outgoing Sympa directory.
F<--defaultdir--/mhonarc-ressources.tt2> template of MHonArc resource file.
F<$DEFAULTDIR/mhonarc-ressources.tt2> template of MHonArc resource file.
F<--CONFIG--> Sympa configuration file.
F<--piddir--/archived.pid> this file contains the process ID
F<$PIDDIR/archived.pid> this file contains the process ID
of F<archived.pl>.
=head1 MORE DOCUMENTATION
......
......@@ -275,11 +275,11 @@ Sets daemon log level.
F<--CONFIG--> Sympa configuration file.
F<--libexecdir--/bouncequeue> bounce spooler, referenced from sendmail alias file
F<$LIBEXECDIR/bouncequeue> bounce spooler, referenced from sendmail alias file
F<--spooldir--/bounce> incoming bounces directory
F<$SPOOLDIR/bounce> incoming bounces directory
F<--piddir--/bounced.pid> this file contains the process ID
F<$PIDDIR/bounced.pid> this file contains the process ID
of F<bounced.pl>.
=head1 MORE DOCUMENTATION
......
......@@ -236,7 +236,7 @@ Logs every sendmail calls.
=head1 FILES
F<--piddir--/bulk.pid> this file contains the process IDs
F<$PIDDIR/bulk.pid> this file contains the process IDs
of F<bulk.pl>.
=head1 SEE ALSO
......
......@@ -1107,7 +1107,7 @@ of F<--CONFIG-->.
=item B<-l>, B<--lang=>I<lang>
Set this option to use a language for Sympa. The corresponding
gettext catalog file must be located in F<--localedir-->
gettext catalog file must be located in F<$LOCALEDIR>
directory.
=item B<--log_level=>I<level>
......
......@@ -387,7 +387,7 @@ Print the version number.
F<--CONFIG--> main configuration file.
F<--piddir--/sympa_automatic.pid> this file contains the process ID
F<$PIDDIR/sympa_automatic.pid> this file contains the process ID
of F<sympa_automatic.pl>.
=head1 SEE ALSO
......
......@@ -458,7 +458,7 @@ of F<--CONFIG-->.
=item B<-l>, B<--lang=>I<lang>
Set this option to use a language for Sympa. The corresponding
gettext catalog file must be located in F<--localedir-->
gettext catalog file must be located in F<$LOCALEDIR>
directory.
=item B<--log_level=>I<level>
......@@ -515,7 +515,7 @@ Print the version number.
F<--CONFIG--> main configuration file.
F<--piddir--/sympa_msg.pid> this file contains the process ID
F<$PIDDIR/sympa_msg.pid> this file contains the process ID
of F<sympa_msg.pl>.
=head1 SEE ALSO
......
......@@ -212,7 +212,7 @@ They may be overridden by robot.conf of each virtual robot.
Source text of alias database.
Default value is F<--SENDMAIL_ALIASES-->.
Default value is F<$SENDMAIL_ALIASES>.
=item aliases_program
......@@ -274,7 +274,7 @@ On other failures, returns with 1.
Sympa site configuration.
=item F<--libexecdir--/sympa_newaliases-wrapper>
=item F<$LIBEXECDIR/sympa_newaliases-wrapper>
Set UID wrapper for sympa_newaliases.pl.
......
......@@ -2128,9 +2128,9 @@ Set log level.
=head1 FILES
F<--spooldir--/task/> directory for task spool.
F<$SPOOLDIR/task/> directory for task spool.
F<--piddir--/task_manager.pid> this file contains the process ID
F<$PIDDIR/task_manager.pid> this file contains the process ID
of F<task_manager.pl>.
=head1 MORE DOCUMENTATION
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment