[interchange-cvs] interchange - heins modified lib/Vend/Config.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Sat Oct 6 02:07:00 2001
User: heins
Date: 2001-10-06 06:06:35 GMT
Modified: lib/Vend Config.pm
Log:
* Allow setting of IC database types via the same type:module:thing
syntax as DBI and LDAP.
* Not for 4.8 tree.
Revision Changes Path
2.6 +16 -0 interchange/lib/Vend/Config.pm
rev 2.6, prev_rev 2.5
Index: Config.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Config.pm,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -r2.5 -r2.6
--- Config.pm 2001/09/01 14:20:30 2.5
+++ Config.pm 2001/10/06 06:06:35 2.6
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.5 2001/09/01 14:20:30 mheins Exp $
+# $Id: Config.pm,v 2.6 2001/10/06 06:06:35 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -95,7 +95,7 @@
use Vend::Parse;
use Vend::Util;
-$VERSION = substr(q$Revision: 2.5 $, 10);
+$VERSION = substr(q$Revision: 2.6 $, 10);
my %CDname;
@@ -2565,6 +2565,22 @@
}
}
# END LDAP
+ elsif( $type =~ /^ic:(\w*)(:(.*))?/ ) {
+ my $class = $1;
+ my $dir = $3;
+ $d->{DIR} = $dir if $dir;
+ if($class =~ /^default$/i) {
+ # Do nothing
+ }
+ elsif($class) {
+ $class = uc $class;
+ if(! $Vend::Data::db_config{$class}) {
+ config_error("unrecognized IC database class: %s (from %s)", $class, $type);
+ }
+ $d->{Class} = $class;
+ }
+ $d->{'type'} = 6;
+ }
elsif( "\U$type" eq 'TAB' ) {
$d->{'type'} = 6;
}