Add /usr/share/ppd as default driver path on Debian
authorJamie Cameron <jcameron@webmin.com>
Wed, 21 Apr 2010 20:14:11 +0000 (13:14 -0700)
committerJamie Cameron <jcameron@webmin.com>
Wed, 21 Apr 2010 20:14:11 +0000 (13:14 -0700)
lpadmin/CHANGELOG
lpadmin/config-debian-linux-4.0-*
lpadmin/cups-driver.pl

index ddc789e..7e00b46 100644 (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.
index f9dcea6..f14d137 100644 (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
index 783e76e..0825cdd 100755 (executable)
@@ -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, $_);
-       }
-close(FIND);
+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);
+       }
 &read_file("$module_config_directory/ppd-cache", \%cache);
 foreach $f (@files) {
        if (!defined($cache{$f})) {