summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2005-09-06 13:50:08 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2005-09-06 13:50:08 +0000
commita685a76ff8fbbfd3d2bd91570cdc7c53159e1a0e (patch)
tree226089f16ee356f10e56ffdab57cf7da3429818c /perl-install
parent3eafbbfdba2fe54c82e8a5a163b3f348af2f3573 (diff)
downloaddrakx-a685a76ff8fbbfd3d2bd91570cdc7c53159e1a0e.tar
drakx-a685a76ff8fbbfd3d2bd91570cdc7c53159e1a0e.tar.gz
drakx-a685a76ff8fbbfd3d2bd91570cdc7c53159e1a0e.tar.bz2
drakx-a685a76ff8fbbfd3d2bd91570cdc7c53159e1a0e.tar.xz
drakx-a685a76ff8fbbfd3d2bd91570cdc7c53159e1a0e.zip
- Some fixes in handling unknown printers.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer/printerdrake.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 947f240c6..ed342a052 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -2405,13 +2405,13 @@ sub setup_common {
my $ptaldevice = "";
my $isHPOJ = 0;
my $isHPLIP = 0;
+ my $searchunknown = N("Unknown model");
my $w;
if ($device =~ m!^/dev/! || $device =~ m!^socket://!) {
# Ask user whether he has a multi-function device when he did not
# do auto-detection or when auto-detection failed
- my $searchunknown = N("Unknown model");
if (!$do_auto_detect ||
- $makemodel eq $searchunknown ||
+ $makemodel =~ /$searchunknown/ ||
$makemodel =~ /^\s*$/) {
local $::isWizard = 0;
if (!$printer->{noninteractive}) {
@@ -2832,7 +2832,11 @@ sub setup_common {
$descr =~ s/ /|/;
} elsif ($automodel) {
$descr = $automodel;
- $descr =~ s/ /|/;
+ if ($descr !~ /$searchunknown/) {
+ $descr =~ s/ /|/;
+ } else {
+ $descr = "|$searchunknown";
+ }
} elsif ($automake) {
$descr = "$descrmake|";
} elsif ($makemodel =~ /\S/) {
@@ -3002,6 +3006,7 @@ sub setup_common {
$descr !~ /Hewlett[\s-]+Packard/i))
{ $printer->{DBENTRY} = "" }
}
+ last;
}
#- Pre-fill the "Description" field with the printer's model name