Fix check after saveConf (#2742)
This commit is contained in:
parent
9314c2f356
commit
826308fbbf
|
@ -115,7 +115,7 @@ sub new {
|
|||
# Serialize $conf and call store().
|
||||
# @param $conf Lemonldap::NG configuration hashRef
|
||||
# @param %args Parameters
|
||||
# @return Number of the saved configuration, 0 in case of error.
|
||||
# @return Number of the saved configuration, <=0 in case of error.
|
||||
sub saveConf {
|
||||
my ( $self, $conf, %args ) = @_;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ foreach (@available) {
|
|||
next if ( $opts{force} );
|
||||
exit 6;
|
||||
}
|
||||
if ( my $r = $new->saveConf( $conf, %newargs ) ) {
|
||||
if ( $new->saveConf( $conf, %newargs ) > 0 ) {
|
||||
print "Conf $conf->{cfgNum} stored\n";
|
||||
next;
|
||||
}
|
||||
|
|
|
@ -466,7 +466,7 @@ if ( !$opts{'dry-run'} ) {
|
|||
print "[OK] Configuration $numConf saved\n";
|
||||
$exitCode = 0;
|
||||
}
|
||||
unless ($numConf) {
|
||||
unless ( $numConf > 0 ) {
|
||||
print "[ERROR] Unable to save configuration\n";
|
||||
$exitCode = 1;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ $conf->{oidcServicePrivateKeySig} = $keys->{private};
|
|||
$conf->{oidcServicePublicKeySig} = $keys->{public};
|
||||
$conf->{oidcServiceKeyIdSig} = $keys->{id};
|
||||
|
||||
$lmconf->saveConf($conf) or die $Lemonldap::NG::Common::Conf::msg;
|
||||
( $lmconf->saveConf($conf) > 0 ) or die $Lemonldap::NG::Common::Conf::msg;
|
||||
|
||||
print "Configuration saved\n" if $debug;
|
||||
|
||||
|
|
|
@ -1962,7 +1962,7 @@ sub registration {
|
|||
$self->conf->{oidcServiceDynamicRegistrationExtraClaims};
|
||||
}
|
||||
|
||||
if ( $self->confAcc->saveConf($conf) ) {
|
||||
if ( $self->confAcc->saveConf($conf) > 0 ) {
|
||||
|
||||
# Reload RP list
|
||||
$self->loadRPs();
|
||||
|
|
Loading…
Reference in New Issue