summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-09-12 09:13:15 +0000
committerFrancois Pons <fpons@mandriva.com>2000-09-12 09:13:15 +0000
commit55597dec8c0060b2dab62c51783b18319bb1eb10 (patch)
tree56e2ec87730623ad4e603aab02fbe4390b3f24e4 /perl-install/printerdrake.pm
parent3a6829ded0f6b8d7ebdff8aec615b134e19b8943 (diff)
downloaddrakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.gz
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.bz2
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.xz
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.zip
*** empty log message ***
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index fc9743ba6..e99c69f1b 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -36,17 +36,19 @@ sub setup_local($$$) {
$_->{val}{DESCRIPTION}) . $_->{port};
}
if (@str) {
- @port = map { $_->{port} } @parport;
+ @port = map { $_->{port} } grep { $_->{val}{DESCRIPTION} } @parport;
+ #- in such case for a beginner, do not ask the port, get the first one.
+ !$::expert && @port > 0 and $in = undef;
} else {
@port = detect_devices::whatPrinterPort();
}
$printer->{DEVICE} = $port[0] if $port[0];
- return if !$in->ask_from_entries_refH(_("Local Printer Device"),
- _("What device is your printer connected to
+ $in and return if !$in->ask_from_entries_refH(_("Local Printer Device"),
+ _("What device is your printer connected to
(note that /dev/lp0 is equivalent to LPT1:)?\n") . (join "\n", @str), [
_("Printer Device") => {val => \$printer->{DEVICE}, list => \@port } ],
- );
+ );
#- make the DeviceURI from DEVICE.
$printer->{DeviceURI} = ($printer->{DEVICE} =~ /usb/ ? "usb:" : "parallel:") . $printer->{DEVICE};