@ echo off
set ORACLE_HOME=%ORACLE_HOME%
set PERL=%ORACLE_HOME%/perl/bin/perl.exe
IF EXIST %ORACLE_HOME%/cv/cvutl/check_nodeadd.pl ( goto VARCHECK ) else ( goto ADDNODE )

:VARCHECK
IF "%IGNORE_PREADDNODE_CHECKS%"=="Y" ( goto ADDNODE ) else ( goto PREADDNODE_ADDNODE )
GOTO :EOF

:PREADDNODE_ADDNODE
%PERL% %ORACLE_HOME%/cv/cvutl/check_nodeadd.pl -pre ORACLE_HOME=%ORACLE_HOME% %*
if "%errorlevel%"=="0" ( goto ADDNODE )
GOTO :EOF

:ADDNODE
%ORACLE_HOME%/oui/bin/setup.exe -addNode ORACLE_HOME=%ORACLE_HOME% -noWelcome %*
GOTO :EOF
