summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/printerdrake
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-09-15 17:12:13 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-09-15 17:12:13 +0000
commita2bd989c2cc7e544f3790bbf7d06a30716aef5c6 (patch)
treee3924b4729c7bcbd6e2506d26d6d01a054c5461f /perl-install/standalone/printerdrake
parentde7a12de940b16dcca44de309b3b5e434bad83b9 (diff)
downloaddrakx-a2bd989c2cc7e544f3790bbf7d06a30716aef5c6.tar
drakx-a2bd989c2cc7e544f3790bbf7d06a30716aef5c6.tar.gz
drakx-a2bd989c2cc7e544f3790bbf7d06a30716aef5c6.tar.bz2
drakx-a2bd989c2cc7e544f3790bbf7d06a30716aef5c6.tar.xz
drakx-a2bd989c2cc7e544f3790bbf7d06a30716aef5c6.zip
Fixed bug of spooler choice via command line options being ignored.
Diffstat (limited to 'perl-install/standalone/printerdrake')
-rwxr-xr-xperl-install/standalone/printerdrake16
1 files changed, 9 insertions, 7 deletions
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);