summaryrefslogtreecommitdiffstats
path: root/base/migrate/TxtTo71/run.bat
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /base/migrate/TxtTo71/run.bat
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'base/migrate/TxtTo71/run.bat')
-rwxr-xr-xbase/migrate/TxtTo71/run.bat186
1 files changed, 186 insertions, 0 deletions
diff --git a/base/migrate/TxtTo71/run.bat b/base/migrate/TxtTo71/run.bat
new file mode 100755
index 000000000..1682bacbc
--- /dev/null
+++ b/base/migrate/TxtTo71/run.bat
@@ -0,0 +1,186 @@
+@ECHO OFF
+REM --- BEGIN COPYRIGHT BLOCK ---
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License along
+REM with this program; if not, write to the Free Software Foundation, Inc.,
+REM 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+REM
+REM Copyright (C) 2007 Red Hat, Inc.
+REM All rights reserved.
+REM --- END COPYRIGHT BLOCK ---
+
+REM
+REM This script converts a normalized <Source CS Version> ldif
+REM text file (e. g. - created via a <Source CS Version>ToTxt
+REM script) into a CS 7.1 ldif data file.
+REM
+REM This CS 7.1 ldif data file can then be imported into the
+REM internal database of the desired CS 7.1 server using a
+REM utility such as ldif2db.
+REM
+
+
+SETLOCAL
+
+
+REM
+REM SERVER_ROOT - fully qualified path of the location of the server
+REM
+
+REM SET SERVER_ROOT=C:\cs71
+
+
+REM
+REM INSTANCE - if the CS instance directory is called 'cert-ca',
+REM set the CS instance to 'ca'
+REM
+REM NOTE: When a single SERVER_ROOT contains more than
+REM one CS instance, this script must be run multiple
+REM times. To do this, there is only a need to change
+REM the INSTANCE parameter.
+REM
+
+REM SET INSTANCE=ca
+
+
+REM
+REM *** DON'T CHANGE ANYTHING BELOW THIS LINE ***
+REM
+
+
+REM
+REM Script-defined constants
+REM
+
+SET CS="CS 7.1"
+
+
+REM
+REM Perform a usage check for the appropriate number of arguments:
+REM
+
+IF "%1" == "" GOTO USAGE
+IF "%3" == "" GOTO CHECK_INPUT_FILE
+
+
+:USAGE
+ECHO.
+ECHO Usage: "%0 input [errors] > output"
+ECHO.
+ECHO where: input - the specified %CS% ldif data file,
+ECHO errors - an optional errors file containing
+ECHO skipped attributes, and
+ECHO output - the normalized %CS% ldif text file.
+ECHO.
+ECHO NOTE: If no redirection is provided to
+ECHO 'output', then the normalized
+ECHO %CS% ldif text will merely
+ECHO be echoed to stdout.
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check that the specified "input" file exists
+REM
+
+:CHECK_INPUT_FILE
+IF EXIST %1 GOTO CHECK_ERRORS_FILE
+
+
+ECHO ERROR: The specified input file, %1, does not exist!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM If an "errors" file is specified, then check that it does not already
+REM exist.
+REM
+
+:CHECK_ERRORS_FILE
+IF "%2" == "" GOTO CHECK_ENVIRONMENT_VARIABLES
+IF EXIST %2 GOTO ERRORS_FILE_ERROR
+GOTO CHECK_ENVIRONMENT_VARIABLES
+
+
+:ERRORS_FILE_ERROR
+ECHO ERROR: The specified errors file, %2, already exists!
+ECHO Please specify a different file!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check presence of user-defined variables
+REM
+
+:CHECK_ENVIRONMENT_VARIABLES
+IF !%SERVER_ROOT%==! GOTO ENVIRONMENT_VARIABLES_ERROR
+IF !%INSTANCE%==! GOTO ENVIRONMENT_VARIABLES_ERROR
+GOTO CHECK_SERVER_ROOT
+
+
+:ENVIRONMENT_VARIABLES_ERROR
+ECHO ERROR: Please specify the SERVER_ROOT and INSTANCE
+ECHO environment variables for this script!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check that the specified SERVER_ROOT exists
+REM
+
+:CHECK_SERVER_ROOT
+IF EXIST %SERVER_ROOT% GOTO CHECK_INSTANCE
+
+
+ECHO ERROR: The specified SERVER_ROOT does not exist!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check that the specified INSTANCE exists
+REM
+
+:CHECK_INSTANCE
+IF EXIST %SERVER_ROOT%\cert-%INSTANCE% GOTO SET_LIBRARY_PATH
+
+
+ECHO ERROR: The specified INSTANCE does not exist!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Setup the appropriate library path environment variable
+REM based upon the platform (WINNT)
+REM
+
+:SET_LIBRARY_PATH
+SET PATH=%SERVER_ROOT%\bin\cert\lib;%SERVER_ROOT%\bin\cert\jre\bin;%SERVER_ROOT\bin\cert\jre\bin\server;%PATH%
+
+
+REM
+REM Convert the specified %CS% ldif data file
+REM into a normalized %CS% ldif text file.
+REM
+
+%SERVER_ROOT%\bin\cert\jre\bin\java.exe -classpath .\classes;%SERVER_ROOT%\cert-%INSTANCE%\classes;%SERVER_ROOT%\bin\cert\classes;%SERVER_ROOT%\bin\cert\jars\certsrv.jar;%SERVER_ROOT%\bin\cert\jars\cmscore.jar;%SERVER_ROOT%\bin\cert\jars\nsutil.jar;%SERVER_ROOT%\bin\cert\jars\jss3.jar;%SERVER_ROOT%\bin\cert\jre\lib\rt.jar Main %1 %2
+
+
+:EXIT_PROCESS
+
+
+ENDLOCAL
+