From 851c9511085247b751c81500d83b2a53f3a43327 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 1 Sep 2005 09:34:53 +0000 Subject: allow removing lines in krb5_conf_update() (for vguardiola) --- perl-install/authentication.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 1affd1a9c..be861cc81 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -586,11 +586,11 @@ sub krb5_conf_update { if (my $i = /^\s*\[\Q$category\E\]/i ... /^\[/) { if ($i =~ /E/) { #- for last line of category chomp $s; $s .= "\n"; - $s .= " $_->[0] = $_->[1]\n" foreach values %subst; + $s .= " $_->[0] = $_->[1]\n" foreach grep { defined($_->[1]) } values %subst; %subst = (); } elsif (/^\s*([^=]*?)\s*=/) { if (my $e = delete $subst{lc($1)}) { - $_ = " $1 = $e->[1]\n"; + $_ = defined($e->[1]) ? " $1 = $e->[1]\n" : ''; } } } @@ -601,7 +601,7 @@ sub krb5_conf_update { if (keys %subst) { chomp $s; $s .= "\n[$category]\n"; - $s .= " $_->[0] = $_->[1]\n" foreach values %subst; + $s .= " $_->[0] = $_->[1]\n" foreach grep { defined($_->[1]) } values %subst; } MDK::Common::File::output($file, $s); -- cgit v1.2.1