From 8de8e2529e3f8742014d2a3fffb851eb036a9da9 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Mon, 28 Jan 2002 23:19:40 +0000 Subject: Replaced "sleep" commands by a subroutine which waits exactly until CUPS is ready. CUPS >= 1.1.12 needs to "know" all devices, let CUPS restart if a device is not "known" to it. --- perl-install/printerdrake.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'perl-install/printerdrake.pm') diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 87138b37b..c572a0e87 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -159,7 +159,6 @@ Normally, CUPS is automatically configured according to your network environment $_ } @cupsd_conf; } printer::write_cupsd_conf(@cupsd_conf); - sleep 3; } # Set auto-configuration state if ($autoconf != $oldautoconf) { @@ -344,6 +343,13 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1 $device = $menuchoice; } + #- if CUPS is the spooler, make sure that CUPS knows the device + if ($printer->{SPOOLER} eq "cups") { + my $w = $in->wait_message + ('', _("Making printer port available for CUPS ...")); + printer::assure_device_is_available_for_cups($device); + } + #- make the DeviceURI from $device. $printer->{currentqueue}{'connect'} = "file:" . $device; @@ -2004,7 +2010,6 @@ sub main { # is shown directly after having done an operation. $menushown = 1; # Initialize the cursor position - #print "##### |$cursorpos|$printer->{DEFAULT}|\n"; if (($cursorpos eq "::") && ($printer->{DEFAULT}) && ($printer->{DEFAULT} ne "")) { -- cgit v1.2.1