From 5eb4aeb98372cb12ce9e4c2fdea297d44b5962e1 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 18 May 2012 16:16:59 +0200 Subject: [PATCH] Fix exit code in update-ldap-pseudonym --- root/etc/e-smith/events/actions/update-ldap-pseudonyms | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/events/actions/update-ldap-pseudonyms b/root/etc/e-smith/events/actions/update-ldap-pseudonyms index d4ceb7f..5542e31 100644 --- a/root/etc/e-smith/events/actions/update-ldap-pseudonyms +++ b/root/etc/e-smith/events/actions/update-ldap-pseudonyms @@ -35,6 +35,7 @@ use Text::Unaccent::PurePerl qw(unac_string); my $c = esmith::ConfigDB->open_ro; my $a = esmith::AccountsDB->open_ro; +my $x = 0; my $i = $c->get('ipasserelle'); my $ip = $i->prop('status') || 'disabled'; my $alias = $i->prop('LdapMailAlias') || 'disabled'; @@ -146,7 +147,7 @@ foreach my $acct (@accounts){ mail => \@alias } ); - $result->code && warn "failed to modify entry $dn=$key,ou=$ou,$base: ", $result->error; + $result->code && ($x = 255, warn "failed to modify entry $dn=$key,ou=$ou,$base: ", $result->error;) } }