Package: mime-support
Version: 3.28-1
Severity: wishlist
Tags: patch
We're using Sarge for our workstations and we had to import several
programs via nfs. These programs also use mime files and we had to patch
update mime to look in these directories too.
We created a generalized version that uses a simple config file with the
directories we're looking at.
I have attached the patch against the sarge version of update-mime and
our config file. Most stuff in the config file is commented out (default
values). It's just an example. A version for the distribution may come
with an empty config or a fully commented out version.
Please consider to apply this patch to the main distribution, I think it
will be handy for admins that have large scale installations.
Feel free to ask if you have any questions.
--
Ihre Systemadministration
- Patrick Cornelissen
Be 4, Zi 3 -- Tel: 7773
[EMAIL PROTECTED]
www.math.uni-bonn.de/support
# update-mime.conf
#$debug = 0;
#$mailcap = "/etc/mailcap";
#$mailcapdef = "/usr/lib/mime/mailcap";
#$mimedir = "/usr/lib/mime/packages";
$mimedir = $mimedir.":/usr/local-mib/share/etc/mime";
#$orderfile = "/etc/mailcap.order";
#$defpriority = 5;
--- /usr/sbin/update-mime 2004-07-16 14:29:04.000000000 +0200
+++ update-mime 2005-09-22 12:15:21.000000000 +0200
@@ -17,18 +17,18 @@
#
# Program Constants
#
+
+# config file name (to be parsed)
+$config = "/etc/update-mime.conf";
+# defaults
$debug = 0;
$mailcap = "/etc/mailcap";
$mailcapdef = "/usr/lib/mime/mailcap";
$mimedir = "/usr/lib/mime/packages";
$orderfile = "/etc/mailcap.order";
-$defpriority= 5;
-
-#$mailcap = "/home/bcwhite/tmp/mailcap";
-#$mimedir = "/home/bcwhite/tmp/mime";
-#$orderfile = "/home/bcwhite/tmp/mime.order";
-
-
+$defpriority = 5;
+# read config if available
+do $config if -f $config;
#
# Global Variables
@@ -46,7 +46,7 @@
$counter=1;
- foreach $file (glob "$mimedir/*") {
+ foreach $file (map { glob $_.'/*' } split ':',$mimedir ) {
next if ($file =~ m!(^|/)(\.|\#)|(\~)$!);
($package) = ($file =~ m|/([^/]*)$|);
print STDERR "$package:\n" if $debug;