diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2002-02-05 23:42:28 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2002-02-05 23:42:28 +0000 |
commit | d91e657e98161963aee317bf02d64ad2b64f835c (patch) | |
tree | ad10acf692d5bd2c1bd318caafbe985765b24947 /perl-install/printerdrake.pm | |
parent | c01a3f6418564b123763043bb8be29c4a326d426 (diff) | |
download | drakx-backup-do-not-use-d91e657e98161963aee317bf02d64ad2b64f835c.tar drakx-backup-do-not-use-d91e657e98161963aee317bf02d64ad2b64f835c.tar.gz drakx-backup-do-not-use-d91e657e98161963aee317bf02d64ad2b64f835c.tar.bz2 drakx-backup-do-not-use-d91e657e98161963aee317bf02d64ad2b64f835c.tar.xz drakx-backup-do-not-use-d91e657e98161963aee317bf02d64ad2b64f835c.zip |
Added automatic configuration of HPOJ for HP's multi-function devices.
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r-- | perl-install/printerdrake.pm | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 126ade703..d1aa9d851 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -448,16 +448,45 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1 } } + #- Check whether the printer is an HP multi-function device and + #- configure HPOJ if it is one + + my $ptaldevice = ""; + if (($menuchoice =~ /HP OfficeJet/i) || + ($menuchoice =~ /HP PSC/i) || + ($menuchoice =~ /HP PhotoSmart/i) || + ($menuchoice =~ /HP LaserJet 1100/i) || + ($menuchoice =~ /HP LaserJet 1200/i) || + ($menuchoice =~ /HP LaserJet 1220/i) || + ($menuchoice =~ /HP LaserJet 3200/i)) { + # Install HPOJ package + if ((!$::testing) && + (!printer::files_exist((qw(/usr/sbin/ptal-mlcd + /etc/ptal-start.conf))))) { + my $w = $in->wait_message('', _("Installing HPOJ package...")); + $in->do_pkgs->install('hpoj'); + } + # Configure and start HPOJ + $ptaldevice = printer::configure_hpoj($device, @parport); + + # make the DeviceURI from $device. + $printer->{currentqueue}{'connect'} = "ptal:/" . $ptaldevice; + } else { + # make the DeviceURI from $device. + $printer->{currentqueue}{'connect'} = "file:" . $device; + } + #- 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); + if ($ptaldevice eq "") { + printer::assure_device_is_available_for_cups($device); + } else { + printer::assure_device_is_available_for_cups($ptaldevice); + } } - #- make the DeviceURI from $device. - $printer->{currentqueue}{'connect'} = "file:" . $device; - #- Read the printer driver database if necessary if ((keys %printer::thedb) == 0) { my $w = $in->wait_message('', _("Reading printer database ...")); |