From a2bd989c2cc7e544f3790bbf7d06a30716aef5c6 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Sat, 15 Sep 2001 17:12:13 +0000 Subject: Fixed bug of spooler choice via command line options being ignored. --- perl-install/standalone/printerdrake | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'perl-install/standalone/printerdrake') diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index d152a2cad..0a339adf6 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -29,7 +29,7 @@ use c; $::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; local $_ = join '', @ARGV; -/-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n"; +/-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing] [--cups] [--lprng] [--lpd] [--pdq]\n"; $::beginner = /-beginner/; $::expert = /-expert/; @@ -42,27 +42,29 @@ my $printer; my $in = 'interactive'->vnew('su', 'printer'); +my $commandline = $_; + { my $w = $in->wait_message('', _("Reading printer data ...")); # Get what was installed before eval { $printer = printer::getinfo('') }; # Choose the spooler by command line options -/-cups/ and +$commandline =~ /-cups/ and $printer->{SPOOLER} = 'cups' and printer::read_configured_queues($printer); -/-lpr/ and +$commandline =~ /-lpr/ and $printer->{SPOOLER} = 'lpd' and printer::read_configured_queues($printer); -/-lpd/ and +$commandline =~ /-lpd/ and $printer->{SPOOLER} = 'lpd' and printer::read_configured_queues($printer); -/-lprng/ and +$commandline =~ /-lprng/ and $printer->{SPOOLER} ='lprng' and printer::read_configured_queues($printer); -/-pdq/ and +$commandline =~ /-pdq/ and $printer->{SPOOLER} = 'pdq' and printer::read_configured_queues($printer); - -r '/etc/modules.conf' and modules::mergein_conf('/etc/modules.conf'); } begin: $::isEmbedded and kill USR2, $::CCPID; + printerdrake::main($printer, $in, 1); $::isEmbedded ? kill(USR1, $::CCPID) : $in->exit(0); -- cgit v1.2.1