From 8f07bf0cd80033e726b32cd0e1e811e712e4a3d7 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Mon, 29 Jul 2002 21:51:40 +0000 Subject: Fixed some "$prefix" issues in the HPOJ auto-configuration and in the Star Office/OpenOffice.org auto-configuration. --- perl-install/printer.pm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/printer.pm b/perl-install/printer.pm index d3d54c478..42d8cfb1f 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -398,7 +398,7 @@ sub set_alternative { sub pdq_panic_button { my $setting = $_[0]; - if (-f "/usr/sbin/pdqpanicbutton") { + if (-f "$prefix/usr/sbin/pdqpanicbutton") { run_program::rooted($prefix, "/usr/sbin/pdqpanicbutton", "--$setting") || die "Could not $setting PDQ panic buttons!"; } @@ -1463,8 +1463,8 @@ sub configure_hpoj { # the subroutine definitions stay valid after leaving this subroutine. if (!$ptalinitread) { local *PTALINIT; - open PTALINIT, "/usr/sbin/ptal-init" || do { - die "unable to open /usr/sbin/ptal-init"; + open PTALINIT, "$prefix/usr/sbin/ptal-init" || do { + die "unable to open $prefix/usr/sbin/ptal-init"; }; my @ptalinitfunctions; # subroutine definitions in /usr/sbin/ptal-init while () { @@ -2296,7 +2296,12 @@ sub findsofficeconfigfile { if (open F, "ls -r $prefix$configfilename 2> /dev/null |") { my $filename = ; close F; - if ($filename) {return $filename}; + if ($filename) { + if ($prefix ne "") { + $filename =~ s:^$prefix::; + } + return $filename; + } } } return ""; @@ -2314,7 +2319,12 @@ sub findopenofficeconfigfile { if (open F, "ls -r $prefix$configfilename 2> /dev/null |") { my $filename = ; close F; - if ($filename) {return $filename}; + if ($filename) { + if ($prefix ne "") { + $filename =~ s:^$prefix::; + } + return $filename; + } } } return ""; -- cgit v1.2.1