Add /usr/share/ppd as default driver path on Debian

This commit is contained in:
Jamie Cameron
2010-04-21 13:14:11 -07:00
parent eed747b00b
commit e9b16e8738
3 changed files with 13 additions and 9 deletions

View File

@@ -15,3 +15,5 @@ Fixed a bug that stopped SMB printer usernames and passwords from being displaye
Re-designed the print jobs page to allow several to be cancelled at once, using the standard Webmin table with checkboxes.
---- Changes since 1.440 ----
Show the date and time a job was submitted on systems using CUPS.
---- Changes since 1.510 ----
Changed the default PPD driver directory on Debian to include /usr/share/ppd as well.

View File

@@ -3,7 +3,7 @@ gs_lib=
iface_arg=
gs_path=gs
spool_dir=/var/spool/cups
model_path=/usr/share/foomatic/db
model_path=/usr/share/foomatic/db /usr/share/ppd
gs_fontpath=
smbclient_path=smbclient
print_style=cups

View File

@@ -135,15 +135,17 @@ local (@ppds, $d, $f, $ppd, %cache, $outofdate, @files, %donefile);
local $findver = &backquote_command("find --version 2>&1", 1);
local $flag = $findver =~ /GNU\s+find\s+version\s+([0-9\.]+)/i && $1 >= 4.2 ?
"-L" : "";
&open_execute_command(FIND, "find $flag ".quotemeta($config{'model_path'}).
" -type f -print", 1, 1);
while(<FIND>) {
chop;
/([^\/]+)$/;
next if ($donefile{$1}++);
push(@files, $_);
foreach my $mp (split(/\s+/, $config{'model_path'})) {
&open_execute_command(FIND, "find $flag ".quotemeta($mp).
" -type f -print", 1, 1);
while(<FIND>) {
chop;
/([^\/]+)$/;
next if ($donefile{$1}++);
push(@files, $_);
}
close(FIND);
}
close(FIND);
&read_file("$module_config_directory/ppd-cache", \%cache);
foreach $f (@files) {
if (!defined($cache{$f})) {