From a39852a0b7429b66478faadf66c7aba69239c032 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Jan 2003 17:07:19 +0000 Subject: - 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 --- perl-install/printer/printerdrake.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'perl-install/printer') 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; -- cgit v1.2.1