diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2004-03-03 00:19:45 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2004-03-03 00:19:45 +0000 |
commit | e41642d0e8a1b6d3b71a149725d4b27ac5afc411 (patch) | |
tree | db15e92f5b053de0b7d8f9cdb871c74ae3740ca3 /perl-install/printer/printerdrake.pm | |
parent | 7126bcad1a712ac850aaa01d5d741a998bf16ac3 (diff) | |
download | drakx-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar drakx-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar.gz drakx-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar.bz2 drakx-e41642d0e8a1b6d3b71a149725d4b27ac5afc411.tar.xz drakx-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/printerdrake.pm')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 15 |
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 && |