Remove invalid code in Karaf scripts 49/52849/1
authording.rui <ding.rui@zte.com.cn>
Mon, 6 Mar 2017 02:39:50 +0000 (10:39 +0800)
committerding.rui <ding.rui@zte.com.cn>
Mon, 6 Mar 2017 02:56:16 +0000 (10:56 +0800)
If jvm version is lower than 1.8.0, the checkJvmVersion function will
exit. As a result, check jvm version code is invalid in subsequent
setupDefaults function.

Change-Id: I0cda1473326e6c90792fa6452c23a0a1dcd89719
Signed-off-by: Ding Rui <ding.rui@zte.com.cn>
karaf/opendaylight-karaf-resources/src/main/resources/bin/karaf

index 3fa7da1fd11deb79c1485e2c9f3ef4317f3017cc..9190728e7263b7a15b66db675d771ca162c1c593 100755 (executable)
@@ -292,17 +292,6 @@ setupDefaults() {
 
     #Set the JVM_VENDOR specific JVM flags
     if [ "$JVM_VENDOR" = "SUN" ]; then
-        # permgen was removed in Java 8
-        VERSION=`$JAVA -version 2>&1 | egrep '"([0-9].[0-9]\..*[0-9]).*"' | awk '{print substr($3,2,length($3)-2)}' | awk '{print substr($1, 3, 3)}' | sed -e 's;\.;;g'`
-        if [ "$VERSION" -lt "80" ]; then
-            # Check some easily accessible MIN/MAX params for JVM mem usage
-            if [ "x$JAVA_PERM_MEM" != "x" ]; then
-                DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -XX:PermSize=$JAVA_PERM_MEM"
-            fi
-            if [ "x$JAVA_MAX_PERM_MEM" != "x" ]; then
-                DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -XX:MaxPermSize=$JAVA_MAX_PERM_MEM"
-            fi
-        fi
         DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote"
     elif [ "$JVM_VENDOR" = "IBM" ]; then
         if $os400; then