summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/printer/data.pm1
-rw-r--r--perl-install/printer/main.pm9
2 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
index c5d1a385a..4a64ead75 100644
--- a/perl-install/printer/data.pm
+++ b/perl-install/printer/data.pm
@@ -11,6 +11,7 @@ use vars qw(@ISA @EXPORT);
our $kernelversion = `uname -r 2>/dev/null`;
$kernelversion =~ s/^(\s*)(\d+\.\d+)(\..*)$/$2/;
+chomp $kernelversion;
our $usbprintermodule = ($kernelversion eq '2.6' ? "usblp" : "printer");
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index fa42e4b54..2d49a7d00 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -2147,6 +2147,15 @@ sub configure_hpoj {
s!etcPtal="/etc/ptal"!etcPtal="$::prefix/etc/ptal"!g;
s!varLock="/var/lock"!varLock="$::prefix/var/lock"!g;
s!varRunPrefix="/var/run"!varRunPrefix="$::prefix/var/run"!g;
+ s!/sbin/lsmod!/usr/bin/lsmod!g;
+ s!/sbin/modprobe!/usr/bin/modprobe!g;
+ s!/sbin/rmmod!/usr/bin/rmmod!g;
+ s!(my\s*\$osPlatform\s*=\s*).*?$!$1"Linux";!g;
+ s!chomp\s*\$osPlatform\s*;\s*$!!g;
+ s!(my\s*\$linuxVersion\s*=\s*).*?$!$1"$kernelversion";!g;
+ s!^\s*\$linuxVersion\s*=~\s*s.*$!!g;
+ s!chomp\s*\$linuxVersion\s*;\s*$!!g;
+ s!(my\s*\$usbprintermodule\s*=\s*).*?$!$1"$usbprintermodule";!g;
}
push @ptalinitfunctions, $_;
}