#!perl # # BEGIN COPYRIGHT BLOCK # Copyright 2001 Sun Microsystems, Inc. # Portions copyright 1999, 2001-2003 Netscape Communications Corporation. # All rights reserved. # END COPYRIGHT BLOCK # # Get information to import a 1.x Directory server's info BEGIN { @INC = ( '../../../admin/admin/bin' , '.' ); } $| = 1; use Cgi; $isNT = -d '\\'; $cgiVars{'server'} =~ /-/; $root = $ENV{'NETSITE_ROOT'}; $oldDir = $cgiVars{'dir'}; $oldDir =~ s/\\/\//g; $oldHome = "$oldDir/$cgiVars{'server'}"; $snmpfile = "$oldHome/config/snmp.conf"; $ds30 = 0; if ( -e $snmpfile) { open ( SRC, $snmpfile) | "Can't open $snmpfile: $!\n"; while ( ) { if ($_=~/^Version/ ) { $where = index ($_, "3.0"); if ($where > -1 ) { $ds30 =1; } } } } # QUERY_STRING still set from invocation print "Content-type: text/html\n\n"; if ($ds30) { print "Import 3.0 Directory Server Info\n"; print "\n"; print "

The server you are attempting to migrate is a 3.0 directory server. There is no need to migrate a 3.0 server to 3.1 server.

\n"; print "\n"; } else { print "Import 1.x Directory Server Info\n"; print "\n"; print "

Import 1.x Directory Server Info

\n"; print '
', "\n"; print "\n"; print "\n"; $cgiVars{'server'} =~ /-/; print "Name: $`-

\n"; print "

\n"; print "

\n\n"; }