diff options
author | Steve Langasek <vorlon@debian.org> | 2008-10-15 15:03:20 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 17:28:28 -0800 |
commit | 7672b834f54fe03b7a1288ecf13967a4179fc10b (patch) | |
tree | e2744b8d6def348357dfbb2b87e642c3b6b8a2ed /debian/local/pam-auth-update | |
parent | abc21aa0bb81bb320cec8d998e6b3cfa3060a79a (diff) |
Use -Initial only for the first profile, even when there's no explicit -Initial
config for that first profile
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}; } |