summaryrefslogtreecommitdiffstats
path: root/perl-install/security
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-05-27 05:37:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-05-27 05:37:24 +0000
commit5d54829d76650974e8422c66b13f68793ef1f9e4 (patch)
tree3eb885026e7d8674a82604dca227aaeb6c800080 /perl-install/security
parent08cf2082294638623da886adbbad631cec24ec4f (diff)
downloaddrakx-5d54829d76650974e8422c66b13f68793ef1f9e4.tar
drakx-5d54829d76650974e8422c66b13f68793ef1f9e4.tar.gz
drakx-5d54829d76650974e8422c66b13f68793ef1f9e4.tar.bz2
drakx-5d54829d76650974e8422c66b13f68793ef1f9e4.tar.xz
drakx-5d54829d76650974e8422c66b13f68793ef1f9e4.zip
use addVarsInSh()
Diffstat (limited to 'perl-install/security')
-rw-r--r--perl-install/security/various.pm16
1 files changed, 8 insertions, 8 deletions
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;