From e41642d0e8a1b6d3b71a149725d4b27ac5afc411 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 3 Mar 2004 00:19:45 +0000 Subject: If an HP multi-function device was configured manually, extract the model name from the HPOJ device entry name. --- perl-install/printer/printerdrake.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 && -- cgit v1.2.1