From 0579c9250c7dfd98c0c47174fe000695921b39fb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 2 Dec 2002 17:06:43 +0000 Subject: use output and append_to_file --- perl-install/any.pm | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'perl-install') 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(<