summaryrefslogtreecommitdiffstats
path: root/perl-install/printer
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2004-03-03 00:19:45 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2004-03-03 00:19:45 +0000
commite41642d0e8a1b6d3b71a149725d4b27ac5afc411 (patch)
treedb15e92f5b053de0b7d8f9cdb871c74ae3740ca3 /perl-install/printer
parent7126bcad1a712ac850aaa01d5d741a998bf16ac3 (diff)
downloaddrakx-backup-do-not-use-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar
drakx-backup-do-not-use-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar.gz
drakx-backup-do-not-use-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar.bz2
drakx-backup-do-not-use-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar.xz
drakx-backup-do-not-use-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.zip
If an HP multi-function device was configured manually, extract the model name from the HPOJ device entry name.
Diffstat (limited to 'perl-install/printer')
-rw-r--r--perl-install/printer/printerdrake.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 88f60828b..45762f1d9 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -1898,6 +1898,21 @@ sub setup_common {
}
if ($ptaldevice) {
+ # HPOJ has determined the device name, make use of it if we
+ # didn't know it before
+ if (!$do_auto_detect ||
+ !$makemodel ||
+ $makemodel eq $searchunknown ||
+ $makemodel =~ /^\s*$/) {
+ $makemodel = $ptaldevice;
+ $makemodel =~ s/^.*:([^:]+)$/$1/;
+ $makemodel =~ s/_/ /g;
+ if ($makemodel =~ /^\s*IJP/i) {
+ $makemodel = "Sony $makemodel";
+ } else {
+ $makemodel = "HP $makemodel";
+ }
+ }
# Configure scanning with SANE on the MF device
if ($makemodel !~ /HP\s+PhotoSmart/i &&
$makemodel !~ /HP\s+LaserJet\s+2200/i &&