Finished fixing problems related to log4j.properties on Windows.
This commit is contained in:
parent
12e1705227
commit
72a6a0003c
@ -18,7 +18,7 @@
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
* Author: Juan Carlos Luciani <jluciani@novell.com>
|
||||
* Author: Greg Richardson
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
@ -60,6 +60,7 @@ public class InitConfigFile
|
||||
final static String INSTALL_DIR_PARAM = "ATS_INSTALL_DIR=";
|
||||
final static String INSTALL_DIR_PROPERTY = "ATS_INSTALL_DIR";
|
||||
final static String PROPERTY_FILE_PARAM = "propertyfile=";
|
||||
final static String ESCAPE_PATH_CHARS = "escape_path_chars=";
|
||||
|
||||
Properties properties;
|
||||
File fileProperties;
|
||||
@ -75,6 +76,7 @@ public class InitConfigFile
|
||||
String sTemplate;
|
||||
String sOutput;
|
||||
int rc;
|
||||
boolean escapePathCharsInReplaceString = false;
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
@ -265,6 +267,21 @@ public class InitConfigFile
|
||||
fileOutput = new File(sOutput);
|
||||
}
|
||||
|
||||
else if (args[i].startsWith(ESCAPE_PATH_CHARS))
|
||||
{
|
||||
// Make sure it is more than the param tag
|
||||
if (args[i].length() <= OUTPUT_FILE_PARAM.length())
|
||||
{
|
||||
return ERROR_BAD_OUTPUT_FILE_PARAM;
|
||||
}
|
||||
|
||||
String value = args[i].substring(OUTPUT_FILE_PARAM.length()).trim();
|
||||
if (value.equalsIgnoreCase("true"))
|
||||
{
|
||||
escapePathCharsInReplaceString = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle additional parameters
|
||||
else
|
||||
{
|
||||
@ -327,7 +344,14 @@ public class InitConfigFile
|
||||
log("Property key = " + sKey + " Value = " + sValue);
|
||||
|
||||
rgsSearchFor[i] = sKey;
|
||||
if (escapePathCharsInReplaceString)
|
||||
{
|
||||
rgsReplaceWith[i] = sValue.replace("\\", "\\\\");
|
||||
}
|
||||
else
|
||||
{
|
||||
rgsReplaceWith[i] = sValue;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
* Author: Juan Carlos Luciani <jluciani@novell.com>
|
||||
* Author: Greg Richardson
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
|
@ -473,7 +473,7 @@
|
||||
"Object" = "8:_32E2D317FBCD4B25904D5402E547B8A8"
|
||||
"FileType" = "3:2"
|
||||
"InstallAction" = "3:1"
|
||||
"Arguments" = "8:[ATS_JAVA_EXE] -cp [TARGETDIR]ats\\bin InitConfigFile ATS_INSTALL_DIR=[TARGETDIR] propertyfile=[PROPERTYFILE] template=[TARGETDIR]ats\\etc\\svc\\templates\\log4j.properties output=[TARGETDIR]ats\\etc\\log4j.properties"
|
||||
"Arguments" = "8:[ATS_JAVA_EXE] -cp [TARGETDIR]ats\\bin InitConfigFile ATS_INSTALL_DIR=[TARGETDIR] escape_path_chars=true propertyfile=[PROPERTYFILE] template=[TARGETDIR]ats\\etc\\svc\\templates\\log4j.properties output=[TARGETDIR]ats\\etc\\log4j.properties"
|
||||
"EntryPoint" = "8:"
|
||||
"Sequence" = "3:17"
|
||||
"Identifier" = "8:_EB425F32_F807_4C36_AC86_B75AEEEC7D29"
|
||||
@ -2787,8 +2787,5 @@
|
||||
"ProjectOutput"
|
||||
{
|
||||
}
|
||||
"VJSharpPlugin"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user