[interchange-cvs] interchange - heins modified scripts/makecat.PL
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Sun Aug 11 20:35:01 2002
User: heins
Date: 2002-08-12 00:34:59 GMT
Modified: scripts makecat.PL
Log:
* Remove default for aliases (now moot since internal HTTP server gone)
* Add query for setting INET mode on when catalog is made with tlink.
Revision Changes Path
2.16 +21 -5 interchange/scripts/makecat.PL
rev 2.16, prev_rev 2.15
Index: makecat.PL
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/scripts/makecat.PL,v
retrieving revision 2.15
retrieving revision 2.16
diff -u -r2.15 -r2.16
--- makecat.PL 27 Jun 2002 18:55:50 -0000 2.15
+++ makecat.PL 12 Aug 2002 00:34:58 -0000 2.16
@@ -3,7 +3,7 @@
#
# Interchange catalog configurator
#
-# $Id: makecat.PL,v 2.15 2002/06/27 18:55:50 jon Exp $
+# $Id: makecat.PL,v 2.16 2002/08/12 00:34:58 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -454,7 +454,6 @@
$dir =3D~ s/^\~/$userdir/;
return $dir;
},
- aliases =3D> sub { return "/$catalog_name" },
cgiurl =3D> sub {
return $ENV{MVC_CGIURL} if $ENV{MVC_CGIURL};
my $url =3D '';
@@ -2044,6 +2043,7 @@
}
my $add;
my $add_tcp;
+ my $add_inet;
=20
umask(07) unless $Conf{noumask};
=20
@@ -2058,6 +2058,8 @@
if($yes and $Inetmode) {
$add_tcp =3D prompt "Add port $lp to TcpMap in interchange.cfg if necess=
ary? ", $add;
$add_tcp =3D is_yes($add_tcp);
+ $add_inet =3D prompt "Set Interchange to run in INET mode if necessary? =
", $add;
+ $add_inet =3D is_yes($add_inet);
}
=20
if($pid) {
@@ -2100,7 +2102,7 @@
if s/^(catalog\s+$catalog_name\s+)/#$1/io;
$full =3D is_yes($1)
if /^\s*fullurl\s+(.*)/i;
- if (/^tcpmap\s+/i and $_ !~ /\b$lp\b/) {
+ if ($add_tcp and /^tcpmap\s+/i and $_ !~ /\b$lh:$lp\b/) {
$tcpmark =3D /^tcpmap\s+[^<]+$/i ? $. : $. + 1;
$tcpmark-- if $mark;
}
@@ -2124,8 +2126,22 @@
$catalog_name, $Conf{catroot}, $full . $Conf{cgiurl}, $Conf{aliases};
=20
if($tcpmark) {
- $out[$tcpmark] =3D~ s/\s*$/ $lp -\n/;
+ $out[$tcpmark] =3D~ s/\s*$/ $lh:$lp -\n/;
}
+
+ if($add_inet) {
+ my $found_inetmode;
+ for(@out) {
+ next unless /^\s*inet_mode\s+/i;
+ $_ =3D "Inet_Mode Yes\n";
+ $found_inetmode =3D 1;
+ last;
+ }
+ if(! $found_inetmode) {
+ push @out, "Inet_Mode Yes\n";
+ }
+ }
+
if (defined $mark) {
print NEWCFG @out[0..$mark-1];
print NEWCFG $newcfgline;
@@ -2257,7 +2273,7 @@
=20
=3Dhead1 VERSION
=20
-# $Id: makecat.PL,v 2.15 2002/06/27 18:55:50 jon Exp $
+# $Id: makecat.PL,v 2.16 2002/08/12 00:34:58 mheins Exp $
=20
=3Dhead1 INTRODUCTION
=20