summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-02 17:06:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-02 17:06:43 +0000
commit0579c9250c7dfd98c0c47174fe000695921b39fb (patch)
tree61f403d81a91155941c545e83efd37fc01c90df1 /perl-install/any.pm
parentd135fab3069bc163d48dc560f87beebb3680318d (diff)
downloaddrakx-backup-do-not-use-0579c9250c7dfd98c0c47174fe000695921b39fb.tar
drakx-backup-do-not-use-0579c9250c7dfd98c0c47174fe000695921b39fb.tar.gz
drakx-backup-do-not-use-0579c9250c7dfd98c0c47174fe000695921b39fb.tar.bz2
drakx-backup-do-not-use-0579c9250c7dfd98c0c47174fe000695921b39fb.tar.xz
drakx-backup-do-not-use-0579c9250c7dfd98c0c47174fe000695921b39fb.zip
use output and append_to_file
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm15
1 files changed, 3 insertions, 12 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index d567beb23..0b7debaf8 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -530,13 +530,9 @@ END
do { $replaced ||= 1
if s/^\s*"?$toreplace{login}"?\s+ppp0\s+(\S+)/"$toreplace{login}" ppp0 "$toreplace{passwd}"/ } foreach @l;
if ($replaced) {
- local *F;
- open F, ">$secrets" or die "Can't open $secrets: $!";
- print F @l;
+ output($secrets, @l);
} else {
- local *F;
- open F, ">>$secrets" or die "Can't open $secrets: $!";
- print F "$toreplace{login} ppp0 \"$toreplace{passwd}\"\n";
+ append_to_file($secrets, "$toreplace{login} ppp0 \"$toreplace{passwd}\"\n");
}
#- restore access right to secrets file, just in case.
chmod 0600, $secrets;
@@ -545,11 +541,7 @@ END
#- install kppprc file according to used configuration.
mkdir_p("$prefix/usr/share/config");
- {
- local *KPPPRC;
- open KPPPRC, ">$prefix/usr/share/config/kppprc" or die "Can't open $prefix/usr/share/config/kppprc: $!";
- #chmod 0600, "$prefix/usr/share/config/kppprc";
- print KPPPRC c::to_utf8(<<END);
+ output("$prefix/usr/share/config/kppprc", c::to_utf8(<<END));
# KDE Config File
[Account0]
ExDNSDisabled=0
@@ -606,7 +598,6 @@ ShowClock=1
DockIntoPanel=0
pppdTimeout=30
END
- }
miscellaneousNetwork();
}