summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/data.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2004-02-14 04:29:30 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2004-02-14 04:29:30 +0000
commit3f00e6d14d872e59fd3998b874d9bf1bc627462f (patch)
treee30c3c354132bde49e69199e168e0ae16ac3c20f /perl-install/printer/data.pm
parentea18f4fa055bc224d956f9b626f60938b9c7e08d (diff)
downloaddrakx-backup-do-not-use-3f00e6d14d872e59fd3998b874d9bf1bc627462f.tar
drakx-backup-do-not-use-3f00e6d14d872e59fd3998b874d9bf1bc627462f.tar.gz
drakx-backup-do-not-use-3f00e6d14d872e59fd3998b874d9bf1bc627462f.tar.bz2
drakx-backup-do-not-use-3f00e6d14d872e59fd3998b874d9bf1bc627462f.tar.xz
drakx-backup-do-not-use-3f00e6d14d872e59fd3998b874d9bf1bc627462f.zip
Let printerdrake load the "usblp" instead of the "printer" kernel module if kernel 2.6.x is used.
Diffstat (limited to 'perl-install/printer/data.pm')
-rw-r--r--perl-install/printer/data.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
index 3a105496a..c5d1a385a 100644
--- a/perl-install/printer/data.pm
+++ b/perl-install/printer/data.pm
@@ -5,9 +5,15 @@ use common;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
-@EXPORT = qw(%spoolers %spooler_inv %shortspooler_inv);
+@EXPORT = qw(%spoolers %spooler_inv %shortspooler_inv
+ $kernelversion $usbprintermodule);
+our $kernelversion = `uname -r 2>/dev/null`;
+$kernelversion =~ s/^(\s*)(\d+\.\d+)(\..*)$/$2/;
+
+our $usbprintermodule = ($kernelversion eq '2.6' ? "usblp" : "printer");
+
our %spoolers = ('pdq' => {
'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
'print_command' => 'lpr-pdq',