From 5274d2da80ed336450e1fb24a3c3334594150101 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 6 Feb 2002 16:06:40 +0000 Subject: Automatic configuration of the scanning part of HP's multi-function devices. --- perl-install/printer.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'perl-install/printer.pm') diff --git a/perl-install/printer.pm b/perl-install/printer.pm index d75e03e76..2d6aec788 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -1418,6 +1418,12 @@ sub copy_foomatic_queue { "-C", $oldspooler, $oldqueue); } +# ------------------------------------------------------------------ +# +# Configuration of HP multi-function devices +# +# ------------------------------------------------------------------ + sub configure_hpoj { my ($device, @autodetected) = @_; # Get the model ID as auto-detected @@ -1520,6 +1526,21 @@ sub configure_hpoj { return $ptaldevice; } +sub config_sane { + my ($ptaldevice) = @_; + + # Create config file for HP backend + output("$prefix/etc/sane.d/hp.conf", + "$ptaldevice\noption connect-ptal\n"); + + # Add HP backend to /etc/sane.d/dll.conf if needed + return if member("hp", chomp_(cat_("$prefix/etc/sane.d/dll.conf"))); + local *F; + open F, ">> $prefix/etc/sane.d/dll.conf" or + die "can't write SANE config in /etc/sane.d/dll.conf: $!"; + print F "hp\n"; + close F; +} #-###################################################################################### #- Wonderful perl :( -- cgit v1.2.1