diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 17:07:19 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 17:07:19 +0000 |
commit | a39852a0b7429b66478faadf66c7aba69239c032 (patch) | |
tree | a2af7ddd68f37512e2e5a1fe0fefe49718ce1b71 | |
parent | 70b22c4bbb23fff2c8457ffcfdd50e20dd7e5aa3 (diff) | |
download | drakx-a39852a0b7429b66478faadf66c7aba69239c032.tar drakx-a39852a0b7429b66478faadf66c7aba69239c032.tar.gz drakx-a39852a0b7429b66478faadf66c7aba69239c032.tar.bz2 drakx-a39852a0b7429b66478faadf66c7aba69239c032.tar.xz drakx-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
-rw-r--r-- | perl-install/printer/printerdrake.pm | 7 |
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; |