summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-11-15 16:47:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-11-15 16:47:26 +0000
commitd3157a39407cc1959cff7bbd001ea9e155ae69ba (patch)
tree41809ba16a4b8c25a8765b003f281442227f1c7c
parentbb1059c163747ae926502db230cde9e63f237ae3 (diff)
downloaddrakx-d3157a39407cc1959cff7bbd001ea9e155ae69ba.tar
drakx-d3157a39407cc1959cff7bbd001ea9e155ae69ba.tar.gz
drakx-d3157a39407cc1959cff7bbd001ea9e155ae69ba.tar.bz2
drakx-d3157a39407cc1959cff7bbd001ea9e155ae69ba.tar.xz
drakx-d3157a39407cc1959cff7bbd001ea9e155ae69ba.zip
adapt to new cat_() only accepting files, ie not doing popen anymore
-rw-r--r--perl-install/printer/main.pm8
-rw-r--r--perl-install/printer/printerdrake.pm3
2 files changed, 3 insertions, 8 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index fa633e0cc..a39514b08 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -1843,12 +1843,8 @@ sub get_descr_from_ppdfile {
sub ppd_devid_data {
my ($ppd) = @_;
$ppd = "$::prefix/usr/share/cups/model/$ppd";
- my @content;
- if ($ppd =~ /\.gz$/i) {
- @content = cat_("$::prefix/bin/zcat $ppd |") or return "", "";
- } else {
- @content = cat_($ppd) or return "", "";
- }
+ my @content = eval { catMaybeCompressed($ppd) } or return "", "";
+
my ($devidmake, $devidmodel);
/^\*Manufacturer:\s*"(.*)"\s*$/ and $devidmake = $1
foreach @content;
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 648e12498..ac490695a 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -4241,8 +4241,7 @@ sub start_network {
sub network_configured() {
# Do configured networks (/etc/sysconfig/network-scripts/ifcfg*) exist?
- my @netscripts =
- cat_("ls -1 $::prefix/etc/sysconfig/network-scripts/ |");
+ my @netscripts = all("$::prefix/etc/sysconfig/network-scripts");
my $netconfigured = 0;
(/ifcfg-/ and !/(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)/ and
!/(~|\.bak)$/ and $netconfigured = 1) foreach @netscripts;