diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2005-08-30 14:38:25 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2005-08-30 14:38:25 +0000 |
commit | fa444513a40632939d0bdf129d659efa1304457d (patch) | |
tree | 80e8f6891308c4d990bb18af73fc46a14df3ad4d /perl-install/printer/printerdrake.pm | |
parent | df3e74aff7b9b86b19dd5394e5cf50baaae79607 (diff) | |
download | drakx-backup-do-not-use-fa444513a40632939d0bdf129d659efa1304457d.tar drakx-backup-do-not-use-fa444513a40632939d0bdf129d659efa1304457d.tar.gz drakx-backup-do-not-use-fa444513a40632939d0bdf129d659efa1304457d.tar.bz2 drakx-backup-do-not-use-fa444513a40632939d0bdf129d659efa1304457d.tar.xz drakx-backup-do-not-use-fa444513a40632939d0bdf129d659efa1304457d.zip |
- Restart CUPS after installing HPLIP for a network printer.
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 589e5429e..a68148d64 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -2775,18 +2775,22 @@ sub setup_common { } #- if CUPS is the spooler, make sure that CUPS knows the device - if ($printer->{SPOOLER} eq "cups" && - $device !~ /^lpd:/ && - $device !~ /^smb:/ && - $device !~ /^socket:/ && - $device !~ /^http:/ && - $device !~ /^ipp:/) { - my $_w = $in->wait_message( - N("Printerdrake"), - N("Making printer port available for CUPS...")) - if !$printer->{noninteractive}; - printer::main::assure_device_is_available_for_cups($ptaldevice || - $device); + if ($printer->{SPOOLER} eq "cups") { + my $hplipsocket = undef; + $hplipsocket = "hp:/" if $hplipdevice =~ m!/net/!i; + if ($hplipsocket || + ($device !~ /^lpd:/ && + $device !~ /^smb:/ && + $device !~ /^socket:/ && + $device !~ /^http:/ && + $device !~ /^ipp:/)) { + my $_w = $in->wait_message( + N("Printerdrake"), + N("Making printer port available for CUPS...")) + if !$printer->{noninteractive}; + printer::main::assure_device_is_available_for_cups( + $hplipsocket || $hplipdevice || $ptaldevice || $device); + } } #- Read the printer driver database if necessary |