From 742de85ea6bf7a1ef70b8223697976165bed267a Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 15 Sep 2008 23:42:52 -0700 Subject: synchronize the state-saving format with the code actually used for comparisons --- debian/local/pam-auth-update | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 3989f9f6..c2fd0dda 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -452,8 +452,30 @@ sub write_profiles } my $i = 0; my $uctype = ucfirst($type); - for my $mod (@enabled) { + for my $mod (@{$enabled}) { my $output; + next if (!$profiles->{$mod}{$uctype . '-Type'}); + next if ($profiles->{$mod}{$uctype . '-Type'} eq 'Additional'); + + if ($i == 0 && $profiles->{$mod}{$uctype . '-Initial'}) + { + $output = $profiles->{$mod}{$uctype . '-Initial'}; + $i++; + } else { + $output = $profiles->{$mod}{$uctype}; + } + if ($output) { + print OUTPUT "Module: $mod\n"; + print OUTPUT $output . "\n"; + } + } + + $i = 0; + for my $mod (@{$enabled}) { + my $output; + next if (!$profiles->{$mod}{$uctype . '-Type'}); + next if ($profiles->{$mod}{$uctype . '-Type'} eq 'Primary'); + if ($i == 0 && $profiles->{$mod}{$uctype . '-Initial'}) { $output = $profiles->{$mod}{$uctype . '-Initial'}; -- cgit v1.2.3