summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-10-02 11:23:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-10-02 11:23:52 +0000
commit19bba6b33f207bc1b92ee8e2aba1c873bbe60c7c (patch)
tree4fa64a61d165f66eeb839618e1c3b72f9e7a42f6 /perl-install/common.pm
parent54b725e9d01d45d1e6d23538a83cbc89e31578ac (diff)
downloaddrakx-19bba6b33f207bc1b92ee8e2aba1c873bbe60c7c.tar
drakx-19bba6b33f207bc1b92ee8e2aba1c873bbe60c7c.tar.gz
drakx-19bba6b33f207bc1b92ee8e2aba1c873bbe60c7c.tar.bz2
drakx-19bba6b33f207bc1b92ee8e2aba1c873bbe60c7c.tar.xz
drakx-19bba6b33f207bc1b92ee8e2aba1c873bbe60c7c.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index d54eb9a2f..b3a6b05e5 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -429,11 +429,7 @@ sub getVarsFromSh($) {
sub setVarsInSh {
my ($file, $l, @fields) = @_;
- @fields = keys %$l unless @fields;
-
- local *F;
- open F, "> $_[0]" or die "cannot create config file $file";
- $l->{$_} and print F "$_=$l->{$_}\n" foreach @fields;
+ setVarsInShMode($file, 0777 ^ umask(), $l, @fields);
}
sub setVarsInShMode {
@@ -441,7 +437,7 @@ sub setVarsInShMode {
@fields = keys %$l unless @fields;
local *F;
- open F, "> $_[0]" or die "cannot create config file $file";
+ open F, "> $file" or die "cannot create config file $file";
chmod $mod, $file;
$l->{$_} and print F "$_=$l->{$_}\n" foreach @fields;
}