diff options
Diffstat (limited to 'debian/local/pam-auth-update')
-rwxr-xr-x | debian/local/pam-auth-update | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 4c09c657..b8cff47b 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -295,11 +295,10 @@ sub create_from_template my $output; next if (!$profiles->{$mod}{$uctype . '-Type'}); next if $profiles->{$mod}{$uctype . '-Type'} ne $val; - if ($i == 0 + if ($i++ == 0 && $profiles->{$mod}{$uctype . '-Initial'}) { $output = $profiles->{$mod}{$uctype . '-Initial'}; - $i++; } else { $output = $profiles->{$mod}{$uctype}; } @@ -318,11 +317,10 @@ sub create_from_template my @output; next if (!$profiles->{$mod}{$uctype . '-Type'}); next if $profiles->{$mod}{$uctype . '-Type'} ne $val; - if ($i == 0 + if ($i++ == 0 && $profiles->{$mod}{$uctype . '-Initial'}) { $output = $profiles->{$mod}{$uctype . '-Initial'}; - $i++; } else { $output = $profiles->{$mod}{$uctype}; } |