From 9e9fd4f3bd7a22b94d1f72f28f1f7f944324e26b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 8 Jan 2003 15:57:52 +0000 Subject: once we identify the protocal, skip remaining tests --- perl-install/printer/printerdrake.pm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'perl-install/printer') diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index c1ede6e13..b85bd1318 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -1124,26 +1124,25 @@ complete => sub { # Non-local printer, check network and abort if no network available if ($printer->{currentqueue}{connect} !~ m!^(file|ptal):/! && - !check_network($printer, $in, $upNetwork, 0)) { return 0 }; - + !check_network($printer, $in, $upNetwork, 0)) { + return 0; + } # If the chosen protocol needs additional software, install it. # LPD does not support filtered queues to a remote LPD server by itself # It needs an additional program as "rlpr" - if ($printer->{currentqueue}{connect} =~ /^lpd:/ && + elsif ($printer->{currentqueue}{connect} =~ /^lpd:/ && $printer->{SPOOLER} eq 'lpd' && !$::testing && !files_exist('/usr/bin/rlpr')) { $in->do_pkgs->install('rlpr'); - } - if ($printer->{currentqueue}{connect} =~ /^smb:/ && + } elsif ($printer->{currentqueue}{connect} =~ /^smb:/ && !$::testing && !files_exist('/usr/bin/smbclient')) { $in->do_pkgs->install('samba-client'); - } - if ($printer->{currentqueue}{connect} =~ /^ncp:/ && + } elsif ($printer->{currentqueue}{connect} =~ /^ncp:/ && !$::testing && !files_exist('/usr/bin/nprint')) { $in->do_pkgs->install('ncpfs'); } #- LPD and LPRng need netcat ('nc') to access to socket printers - if ($printer->{currentqueue}{connect} =~ /^socket:/ && + elsif ($printer->{currentqueue}{connect} =~ /^socket:/ && ($printer->{SPOOLER} eq 'lpd' || $printer->{SPOOLER} eq 'lprng') && !$::testing && !files_exist('/usr/bin/nc')) { $in->do_pkgs->install('nc'); -- cgit v1.2.1