summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-02-24 23:40:49 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-02-24 23:40:49 +0000
commit4dc0608d3b01b1dbe362c17b942954371ee70876 (patch)
treee9a1c8830bb409eb3327e979f6707ac524474249 /perl-install
parentd458d088dd46ec695962c2e39799b06fb27c9ae1 (diff)
downloaddrakx-backup-do-not-use-4dc0608d3b01b1dbe362c17b942954371ee70876.tar
drakx-backup-do-not-use-4dc0608d3b01b1dbe362c17b942954371ee70876.tar.gz
drakx-backup-do-not-use-4dc0608d3b01b1dbe362c17b942954371ee70876.tar.bz2
drakx-backup-do-not-use-4dc0608d3b01b1dbe362c17b942954371ee70876.tar.xz
drakx-backup-do-not-use-4dc0608d3b01b1dbe362c17b942954371ee70876.zip
Generalized the search method for Star/Open Office so that automatic printer configuration also works for Star Office 6.x and 5.1.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer.pm23
1 files changed, 13 insertions, 10 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index a9d5eb80d..65dce935c 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -1924,14 +1924,17 @@ sub removeopenofficeprinterentry {
}
sub findsofficeconfigfile {
- my @configfilenames = ("/usr/lib/office52/share/xp3/Xpdefaults",
- "/usr/local/lib/office52/share/xp3/Xpdefaults",
- "/usr/local/office52/share/xp3/Xpdefaults",
- "/opt/office52/share/xp3/Xpdefaults");
+ my @configfilenames = ("/usr/lib/*/share/xp3/Xpdefaults",
+ "/usr/local/lib/*/share/xp3/Xpdefaults",
+ "/usr/local/*/share/xp3/Xpdefaults",
+ "/opt/*/share/xp3/Xpdefaults");
my $configfilename = "";
for $configfilename (@configfilenames) {
- if (-r "$prefix$configfilename") {
- return $configfilename;
+ local *F;
+ if (open F, "ls -r $prefix$configfilename 2> /dev/null |") {
+ my $filename = <F>;
+ close F;
+ if ($filename) {return $filename};
}
}
return "";
@@ -1939,10 +1942,10 @@ sub findsofficeconfigfile {
sub findopenofficeconfigfile {
my @configfilenames =
- ("/usr/lib/OpenOffice.org*/share/psprint/psprint.conf",
- "/usr/local/lib/OpenOffice.org*/share/psprint/psprint.conf",
- "/usr/local/OpenOffice.org*/share/psprint/psprint.conf",
- "/opt/OpenOffice.org*/share/psprint/psprint.conf");
+ ("/usr/lib/*/share/psprint/psprint.conf",
+ "/usr/local/lib/*/share/psprint/psprint.conf",
+ "/usr/local/*/share/psprint/psprint.conf",
+ "/opt/*/share/psprint/psprint.conf");
my $configfilename = "";
for $configfilename (@configfilenames) {
local *F;