diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2002-02-06 16:06:40 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2002-02-06 16:06:40 +0000 |
commit | 5274d2da80ed336450e1fb24a3c3334594150101 (patch) | |
tree | 07ddb3a99db51f3dd7a35240cd966bd5dd6cf7eb /perl-install/printer.pm | |
parent | 2086bda466b5bbd688e88cd25a38a52f3d71d053 (diff) | |
download | drakx-5274d2da80ed336450e1fb24a3c3334594150101.tar drakx-5274d2da80ed336450e1fb24a3c3334594150101.tar.gz drakx-5274d2da80ed336450e1fb24a3c3334594150101.tar.bz2 drakx-5274d2da80ed336450e1fb24a3c3334594150101.tar.xz drakx-5274d2da80ed336450e1fb24a3c3334594150101.zip |
Automatic configuration of the scanning part of HP's multi-function devices.
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r-- | perl-install/printer.pm | 21 |
1 files changed, 21 insertions, 0 deletions
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 :( |