|
|
|
@ -18,6 +18,7 @@ has confTreeFile => ( isa => 'Str', is => 'ro', required => 1 ); |
|
|
|
|
has managerConstantsFile => ( isa => 'Str', is => 'ro', required => 1 ); |
|
|
|
|
has managerAttributesFile => ( isa => 'Str', is => 'ro', required => 1 ); |
|
|
|
|
has defaultValuesFile => ( isa => 'Str', is => 'ro', required => 1 ); |
|
|
|
|
has confConstantsFile => ( isa => 'Str', is => 'ro', required => 1 ); |
|
|
|
|
has firstLmConfFile => ( isa => 'Str', is => 'ro', required => 1 ); |
|
|
|
|
|
|
|
|
|
my @managerAttrKeys = qw(keyTest select type test msgFail default); |
|
|
|
@ -216,6 +217,70 @@ $defaultAttr} |
|
|
|
|
close F; |
|
|
|
|
print STDERR "done\n"; |
|
|
|
|
|
|
|
|
|
printf STDERR $format, $self->confConstantsFile; |
|
|
|
|
$ra = Regexp::Assemble->new; |
|
|
|
|
foreach ( @simpleHashKeys, sort keys %cnodesRe ) { |
|
|
|
|
$ra->add($_); |
|
|
|
|
} |
|
|
|
|
my $confConstants = "our \$hashParameters = '" . $ra->as_string . "';\n"; |
|
|
|
|
open( F, ">", $self->confConstantsFile ) or die($!); |
|
|
|
|
print F <<EOF; |
|
|
|
|
# This file is generated by $module. Don't modify it by hand |
|
|
|
|
package Lemonldap::NG::Common::Conf::Constants; |
|
|
|
|
|
|
|
|
|
use strict; |
|
|
|
|
use Exporter 'import'; |
|
|
|
|
use base qw(Exporter); |
|
|
|
|
|
|
|
|
|
our \$VERSION = '$Lemonldap::NG::Manager::Build::Attributes::VERSION'; |
|
|
|
|
|
|
|
|
|
# CONSTANTS |
|
|
|
|
|
|
|
|
|
use constant CONFIG_WAS_CHANGED => -1; |
|
|
|
|
use constant UNKNOWN_ERROR => -2; |
|
|
|
|
use constant DATABASE_LOCKED => -3; |
|
|
|
|
use constant UPLOAD_DENIED => -4; |
|
|
|
|
use constant SYNTAX_ERROR => -5; |
|
|
|
|
use constant DEPRECATED => -6; |
|
|
|
|
use constant DEFAULTCONFFILE => "/usr/local/lemonldap-ng/etc/lemonldap-ng.ini"; |
|
|
|
|
use constant DEFAULTSECTION => "all"; |
|
|
|
|
use constant CONFSECTION => "configuration"; |
|
|
|
|
use constant PORTALSECTION => "portal"; |
|
|
|
|
use constant HANDLERSECTION => "handler"; |
|
|
|
|
use constant MANAGERSECTION => "manager"; |
|
|
|
|
use constant SESSIONSEXPLORERSECTION => "sessionsExplorer"; |
|
|
|
|
use constant APPLYSECTION => "apply"; |
|
|
|
|
$confConstants |
|
|
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
|
|
|
|
'all' => [ |
|
|
|
|
qw( |
|
|
|
|
CONFIG_WAS_CHANGED |
|
|
|
|
UNKNOWN_ERROR |
|
|
|
|
DATABASE_LOCKED |
|
|
|
|
UPLOAD_DENIED |
|
|
|
|
SYNTAX_ERROR |
|
|
|
|
DEPRECATED |
|
|
|
|
DEFAULTCONFFILE |
|
|
|
|
DEFAULTSECTION |
|
|
|
|
CONFSECTION |
|
|
|
|
PORTALSECTION |
|
|
|
|
HANDLERSECTION |
|
|
|
|
MANAGERSECTION |
|
|
|
|
SESSIONSEXPLORERSECTION |
|
|
|
|
APPLYSECTION |
|
|
|
|
\$hashParameters |
|
|
|
|
) |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
our \@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } ); |
|
|
|
|
our \@EXPORT = ( \@{ \$EXPORT_TAGS{'all'} } ); |
|
|
|
|
|
|
|
|
|
1; |
|
|
|
|
EOF |
|
|
|
|
close F; |
|
|
|
|
print STDERR "done\n"; |
|
|
|
|
|
|
|
|
|
printf STDERR $format, $self->managerAttributesFile; |
|
|
|
|
my $managerAttr = { |
|
|
|
|
map { |
|
|
|
|