You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2013/11/06 20:30:25 UTC
svn commit: r1539435 -
/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install
Author: challngr
Date: Wed Nov 6 19:30:25 2013
New Revision: 1539435
URL: http://svn.apache.org/r1539435
Log:
UIMA-3412 Correctly set ducc.head and ducc.jvm during ducc_post_install.
Modified:
uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install?rev=1539435&r1=1539434&r2=1539435&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install Wed Nov 6 19:30:25 2013
@@ -126,13 +126,17 @@ class PostInstall(DuccUtil):
def update_property(self, key, val, comment):
self.ducc_properties.put(key, val)
propsfile = self.DUCC_HOME + "/resources/ducc.properties"
- tmp_propsfile = propsfile + ".tmp"
+ tmp_propsfile = self.DUCC_HOME + "/resources/ducc.properties.tmp"
f = open(propsfile)
tf = open(tmp_propsfile, "w")
- tf.write('# ' + comment + '\n')
- tf.write(key + " = " + val + "\n")
for line in f:
- tf.write(line);
+ l = line.strip()
+ if ( l.startswith(key) ):
+ tf.write('# ' + comment + '\n')
+ tf.write(key + ' = ' + val + '\n')
+ else:
+ tf.write(line);
+
f.close()
tf.close()
os.rename(propsfile, propsfile + ".orig")
@@ -142,7 +146,7 @@ class PostInstall(DuccUtil):
def get_java_bindir(self):
java = self.java()
- if ( java == None ):
+ if ( java == '<full-path-to-java-command>' ):
java = self.which('java')
if ( java == None ):
self.fail("Cannot find Java. The path to java must be configured in ducc.properties as property", 'ducc.jvm')
@@ -211,7 +215,7 @@ class PostInstall(DuccUtil):
def setup_ducc_head(self):
ducc_head = self.ducc_properties.get('ducc.head')
- if ( ducc_head == None ):
+ if ( ducc_head == '<head-node>' ):
ducc_head = self.localhost
self.update_property('ducc.head', ducc_head, "ducc.head is the node where the main DUCC daemons run");
@@ -234,10 +238,7 @@ class PostInstall(DuccUtil):
self.java_bindir = self.get_java_bindir()
self.keytool = self.get_java_keytool(self.java_bindir)
print 'Java version:', self.get_java_version()
- if ( not '1.6' in self.get_java_version() ):
- print 'WARNING: DUCC is only tested under Java 1.6'
- else:
- print 'Java is verified.'
+ print 'Java is verified.'
self.create_keystore(self.keytool)
print '\nWeb server keystore generated from ducc.properties'