summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-08-20 02:52:17 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:28:25 -0800
commit04ef314b23d82cf8d57ada9915a5eae49f66317b (patch)
tree0f1d14b33300946a5e1c8bd9331bbfbc37169f15 /debian
parent2ff4cd062582074fb129e6f66a39da316506f3f2 (diff)
@enabled needs to be a unique array, sorted by priority.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/local/pam-auth-update3
1 files changed, 3 insertions, 0 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update
index a9b93d62..53e6334c 100755
--- a/debian/local/pam-auth-update
+++ b/debian/local/pam-auth-update
@@ -101,6 +101,9 @@ if (!@enabled) {
push(@enabled,
grep { $profiles{$_}->{'Default'} eq 'yes' && !$seen{$_} } @sorted);
}
+@enabled = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a}->{'Priority'} } @enabled;
+my $prev = '';
+@enabled = grep { $_ ne $prev && (($prev) = $_) } @enabled;
fset($template,'seen','false');
set($template,join(', ', @enabled));