From 5d54829d76650974e8422c66b13f68793ef1f9e4 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 27 May 2005 05:37:24 +0000 Subject: use addVarsInSh() --- perl-install/security/various.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'perl-install/security') diff --git a/perl-install/security/various.pm b/perl-install/security/various.pm index 23b9174ef..e9147f52f 100644 --- a/perl-install/security/various.pm +++ b/perl-install/security/various.pm @@ -8,23 +8,23 @@ use common; sub config_libsafe { my $setting = @_ > 1; my ($prefix, $libsafe) = @_; - my %t = getVarsFromSh("$prefix/etc/sysconfig/system"); if ($setting) { - $t{LIBSAFE} = bool2yesno($libsafe); - setVarsInSh("$prefix/etc/sysconfig/system", \%t); + addVarsInSh("$prefix/etc/sysconfig/system", { LIBSAFE => bool2yesno($libsafe) }); + } else { + my %t = getVarsFromSh("$prefix/etc/sysconfig/system"); + text2bool($t{LIBSAFE}); } - text2bool($t{LIBSAFE}); } sub config_security_user { my $setting = @_ > 1; my ($prefix, $sec_user) = @_; - my %t = getVarsFromSh("$prefix/etc/security/msec/security.conf"); if ($setting) { - $t{MAIL_USER} = $sec_user; - setVarsInSh("$prefix/etc/security/msec/security.conf", \%t); + addVarsInSh("$prefix/etc/security/msec/security.conf", { MAIL_USER => $sec_user }); + } else { + my %t = getVarsFromSh("$prefix/etc/security/msec/security.conf"); + $t{MAIL_USER}; } - $t{MAIL_USER}; } 1; -- cgit v1.2.1