summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/main.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2005-02-13 23:02:33 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2005-02-13 23:02:33 +0000
commit05b36518c04d058352c1a0c9f4a0f16c2240e712 (patch)
treeeabab8842f0e84ad066a5f241b2c218f652ee625 /perl-install/printer/main.pm
parentee0e8661c12639691d28753753a8390144d713ce (diff)
downloaddrakx-05b36518c04d058352c1a0c9f4a0f16c2240e712.tar
drakx-05b36518c04d058352c1a0c9f4a0f16c2240e712.tar.gz
drakx-05b36518c04d058352c1a0c9f4a0f16c2240e712.tar.bz2
drakx-05b36518c04d058352c1a0c9f4a0f16c2240e712.tar.xz
drakx-05b36518c04d058352c1a0c9f4a0f16c2240e712.zip
Allow HPLIP setup also when setting up the print queue manually.
Diffstat (limited to 'perl-install/printer/main.pm')
-rw-r--r--perl-install/printer/main.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index 405c2f353..6af5aad63 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -2524,6 +2524,23 @@ sub start_hplip {
return undef;
}
+sub start_hplip_manual {
+
+ # Start HPLIP daemons
+ printer::services::start_not_running_service("hplip");
+
+ # Return all possible device URIs
+ open(my $F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
+ '/bin/sh -c "export LC_ALL=C; /usr/lib/cups/backend/hp" |') or
+ die 'Could not run "/usr/lib/cups/backend/hp"!';
+ my @uris;
+ while (<$F>) {
+ m!^direct\s+(hp:\S+)\s+!;
+ push(@uris, $1);
+ }
+ return @uris;
+}
+
sub configure_hpoj {
my ($device, @autodetected) = @_;