diff options
author | Francois Pons <fpons@mandriva.com> | 2000-11-09 13:49:18 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-11-09 13:49:18 +0000 |
commit | 23c7d3cd00f963d39d8884d3b92cabb57ff7f623 (patch) | |
tree | db2080ebc65290b7fdb15116a4951e875cdd512b /perl-install | |
parent | de1f7dc62a8ddcd1f85050476942cf378472eda2 (diff) | |
download | drakx-23c7d3cd00f963d39d8884d3b92cabb57ff7f623.tar drakx-23c7d3cd00f963d39d8884d3b92cabb57ff7f623.tar.gz drakx-23c7d3cd00f963d39d8884d3b92cabb57ff7f623.tar.bz2 drakx-23c7d3cd00f963d39d8884d3b92cabb57ff7f623.tar.xz drakx-23c7d3cd00f963d39d8884d3b92cabb57ff7f623.zip |
fixed modification of BrowsePoll on a existing file.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/printerdrake.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 1d3cd5b2b..2b8af1b88 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -396,7 +396,6 @@ In case of doubt, select \"Remote CUPS server\"."), if ($printer->{TYPE} eq 'CUPS') { #- hack to handle cups remote server printing, #- first read /etc/cups/cupsd.conf for variable BrowsePoll address:port - printer::poll_ppd_base(); #- make sure /etc/cups/cupsd.conf is generated before if any. my @cupsd_conf = printer::read_cupsd_conf(); my ($server, $port); @@ -430,10 +429,12 @@ _("Port") => \$port ], )) { $server && $port and $server = "$server:$port"; if ($server) { - @cupsd_conf = map { s/^\s*BrowsePoll\s+(\S+)/BrowsePoll $server/ and undef $server } @cupsd_conf; + @cupsd_conf = map { $server and s/^\s*BrowsePoll\s+(\S+)/BrowsePoll $server/ and $server = ''; + $_ } @cupsd_conf; $server and push @cupsd_conf, "\nBrowsePoll $server\n"; } else { - @cupsd_conf = map { s/^\s*BrowsePoll\s+(\S+)/\#BrowsePoll $1/ } @cupsd_conf; + @cupsd_conf = map { s/^\s*BrowsePoll\s+(\S+)/\#BrowsePoll $1/; + $_ } @cupsd_conf; } printer::write_cupsd_conf(@cupsd_conf); } |