home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl5 -w
- #
- # syntax-admin.cgi
- #
- # Copyright 1988-1996 Silicon Graphics, Inc.
- # All rights reserved.
- #
- # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- # the contents of this file may not be disclosed to third parties, copied or
- # duplicated in any form, in whole or in part, without the prior written
- # permission of Silicon Graphics, Inc.
- #
- # RESTRICTED RIGHTS LEGEND:
- # Use, duplication or disclosure by the Government is subject to restrictions
- # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- # rights reserved under the Copyright Laws of the United States.
- #
- # $Id: syntax-admin.frm,v 1.7 1998/02/11 23:21:50 jrw Exp $
-
- $file = "/opt/TAS/tn/totaladmin/W3/conf/httpd.conf";
- $admin_port = 7777;
- if (-e $file) {
- open(IN, "< $file");
- while(<IN>) {
- if ($_ =~ /^Port\s+([0-9]+)/) { $admin_port = $1; }
- }
- close(IN);
- }
-
- if (-e "/etc/rc2.d/S99totaladmin") {
- $url = "http://" . $ENV{'SERVER_NAME'} . ":" . $admin_port;
-
- print "Window-target: gateway_syntax\n";
- print "Content-type: text/html\n\n";
- print "<HTML><HEAD><TITLE>Syntax IPX/IP Gateway</TITLE>\n"
- . "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$url\">\n"
- . "</HEAD><BODY></BODY></HTML>\n";
-
- exit 0;
- } else {
- print "Content-type: text/html\n\n";
- print "<center><h2>Syntax IPX/IP Gateway</h2></center>"
- . "<i>The necessary Syntax software is not installed on"
- . " this system. Please load the </i><b>TAS</b><i>"
- . " and </i><b>Igate</b><i> images from the WebFORCE CD.";
- }
-