summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/printerdrake.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-07 17:07:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-07 17:07:19 +0000
commita39852a0b7429b66478faadf66c7aba69239c032 (patch)
treea2af7ddd68f37512e2e5a1fe0fefe49718ce1b71 /perl-install/printer/printerdrake.pm
parent70b22c4bbb23fff2c8457ffcfdd50e20dd7e5aa3 (diff)
downloaddrakx-backup-do-not-use-a39852a0b7429b66478faadf66c7aba69239c032.tar
drakx-backup-do-not-use-a39852a0b7429b66478faadf66c7aba69239c032.tar.gz
drakx-backup-do-not-use-a39852a0b7429b66478faadf66c7aba69239c032.tar.bz2
drakx-backup-do-not-use-a39852a0b7429b66478faadf66c7aba69239c032.tar.xz
drakx-backup-do-not-use-a39852a0b7429b66478faadf66c7aba69239c032.zip
- fix autodetection code (remember me to teach titi that "and" in list context is bad)
- use printer::detect::whatNetPrinter directly (instead of net_detect() + net_smb_detect()), it is faster when one wants both
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r--perl-install/printer/printerdrake.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index f15b9d03e..c1ede6e13 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -361,9 +361,10 @@ sub setup_local_autoscan {
# configured, this command has no effect.
require services;
services::stop("hpoj");
- @autodetected = $expert_or_modify || $printer->{AUTODETECTLOCAL} and printer::detect::local_detect(),
- (!$expert_or_modify && $printer->{AUTODETECTNETWORK}) and printer::detect::net_detect(),
- (!$expert_or_modify && $printer->{AUTODETECTSMB}) and printer::detect::net_smb_detect();
+ @autodetected = (
+ $expert_or_modify || $printer->{AUTODETECTLOCAL} ? printer::detect::local_detect() : (),
+ !$expert_or_modify ? printer::detect::whatNetPrinter($printer->{AUTODETECTNETWORK}, $printer->{AUTODETECTSMB}) : (),
+ );
# We have more than one printer, so we must ask the user for a queue
# name in the fully automatic printer configuration.
$printer->{MORETHANONE} = $#autodetected > 0;