| author | Scott Brand | 2011-12-14 08:06:13 (EST) |
|---|---|---|
| committer | Hristo Iliev | 2011-12-14 08:06:13 (EST) |
| commit | 006e113f9ec35c00be0ea65aac1742cdc29b6261 (patch) (side-by-side diff) | |
| tree | ad4d7606cb17dc8940c6c91dbf9074468000c6a2 | |
| parent | 6e7b22d85e70ba7b782216ab47b9fa6530ea2f26 (diff) | |
| download | org.eclipse.virgo.kernel-006e113f9ec35c00be0ea65aac1742cdc29b6261.zip org.eclipse.virgo.kernel-006e113f9ec35c00be0ea65aac1742cdc29b6261.tar.gz org.eclipse.virgo.kernel-006e113f9ec35c00be0ea65aac1742cdc29b6261.tar.bz2 | |
Bug 366351 - Update virgo start and shutdown scripts to work under cygwin
| -rwxr-xr-x | build-kernel/bin/checkJava.sh | 8 | ||||
| -rw-r--r--[-rwxr-xr-x] | build-kernel/bin/dmk.bat | 0 | ||||
| -rwxr-xr-x | build-kernel/bin/dmk.sh | 41 | ||||
| -rwxr-xr-x | build-kernel/bin/shutdown.sh | 9 | ||||
| -rwxr-xr-x | build-kernel/bin/startup.sh | 9 |
5 files changed, 58 insertions, 9 deletions
diff --git a/build-kernel/bin/checkJava.sh b/build-kernel/bin/checkJava.sh index 3dace27..9bf9ca1 100755 --- a/build-kernel/bin/checkJava.sh +++ b/build-kernel/bin/checkJava.sh @@ -1,5 +1,13 @@ #!/bin/bash + +# +# make adjustment when running under cygwin +# +if $cygwin; then + CLASSPATH=$(cygpath -wp $CLASSPATH) +fi + # Run java version check with the discovered java jvm. $JAVA_HOME/bin/java \ -classpath $CLASSPATH \ diff --git a/build-kernel/bin/dmk.bat b/build-kernel/bin/dmk.bat index f9e1a55..f9e1a55 100755..100644 --- a/build-kernel/bin/dmk.bat +++ b/build-kernel/bin/dmk.bat diff --git a/build-kernel/bin/dmk.sh b/build-kernel/bin/dmk.sh index 54bd84b..e349320 100755 --- a/build-kernel/bin/dmk.sh +++ b/build-kernel/bin/dmk.sh @@ -142,23 +142,41 @@ then echo "Warning: Kernel shell not supported; -shell option ignored." # LAUNCH_OPTS="$LAUNCH_OPTS -Forg.eclipse.virgo.kernel.shell.local=true" fi - + + ACCESS_PROPERTIES=$CONFIG_DIR/org.eclipse.virgo.kernel.jmxremote.access.properties + AUTH_LOGIN=$CONFIG_DIR/org.eclipse.virgo.kernel.authentication.config + AUTH_FILE=$CONFIG_DIR/org.eclipse.virgo.kernel.users.properties + CONFIG_PROPS=$KERNEL_HOME/lib/org.eclipse.virgo.kernel.launch.properties + CONFIG_AREA=$KERNEL_HOME/work/osgi/configuration + JAVA_PROFILE=$KERNEL_HOME/lib/java6-server.profile + + if $cygwin; then + ACCESS_PROPERTIES=$(cygpath -wp $ACCESS_PROPERTIES) + AUTH_LOGIN=$(cygpath -wp $AUTH_LOGIN) + AUTH_FILE=$(cygpath -wp $AUTH_FILE) + CONFIG_PROPS=$(cygpath -wp $CONFIG_PROPS) + KERNEL_HOME=$(cygpath -wp $KERNEL_HOME) + CONFIG_DIR=$(cygpath -wp $CONFIG_DIR) + CONFIG_AREA=$(cygpath -wp $CONFIG_AREA) + JAVA_PROFILE=$(cygpath -wp $JAVA_PROFILE) + fi + # Set the required permissions on the JMX configuration files - chmod 600 $CONFIG_DIR/org.eclipse.virgo.kernel.jmxremote.access.properties + chmod 600 $ACCESS_PROPERTIES JMX_OPTS=" \ $JMX_OPTS \ -Dcom.sun.management.jmxremote.port=$JMX_PORT \ -Dcom.sun.management.jmxremote.authenticate=true \ -Dcom.sun.management.jmxremote.login.config=virgo-kernel \ - -Dcom.sun.management.jmxremote.access.file=$CONFIG_DIR/org.eclipse.virgo.kernel.jmxremote.access.properties \ + -Dcom.sun.management.jmxremote.access.file="$ACCESS_PROPERTIES" \ -Djavax.net.ssl.keyStore=$KEYSTORE_PATH \ -Djavax.net.ssl.keyStorePassword=$KEYSTORE_PASSWORD \ -Dcom.sun.management.jmxremote.ssl=true \ -Dcom.sun.management.jmxremote.ssl.need.client.auth=false" # If we get here we have the correct Java version. - + if [ -z "$NO_START_FLAG" ] then TMP_DIR=$KERNEL_HOME/work/tmp @@ -172,19 +190,19 @@ then -XX:+HeapDumpOnOutOfMemoryError \ -XX:ErrorFile=$KERNEL_HOME/serviceability/error.log \ -XX:HeapDumpPath=$KERNEL_HOME/serviceability/heap_dump.hprof \ - -Djava.security.auth.login.config=$CONFIG_DIR/org.eclipse.virgo.kernel.authentication.config \ - -Dorg.eclipse.virgo.kernel.authentication.file=$CONFIG_DIR/org.eclipse.virgo.kernel.users.properties \ + -Djava.security.auth.login.config=$AUTH_LOGIN \ + -Dorg.eclipse.virgo.kernel.authentication.file=$AUTH_FILE \ -Djava.io.tmpdir=$TMP_DIR \ -Dorg.eclipse.virgo.kernel.home=$KERNEL_HOME \ -Dorg.eclipse.equinox.console.jaas.file="$CONFIG_DIR/store" \ -Dssh.server.keystore="$CONFIG_DIR/hostkey.ser" \ -classpath $CLASSPATH \ org.eclipse.virgo.osgi.launcher.Launcher \ - -config $KERNEL_HOME/lib/org.eclipse.virgo.kernel.launch.properties \ + -config $CONFIG_PROPS \ -Forg.eclipse.virgo.kernel.home=$KERNEL_HOME \ -Forg.eclipse.virgo.kernel.config=$CONFIG_DIR \ - -Fosgi.configuration.area=$KERNEL_HOME/work/osgi/configuration \ - -Fosgi.java.profile="file:$KERNEL_HOME/lib/java6-server.profile" \ + -Fosgi.configuration.area=$CONFIG_AREA \ + -Fosgi.java.profile="file:$JAVA_PROFILE" \ $LAUNCH_OPTS \ $ADDITIONAL_ARGS fi @@ -244,6 +262,11 @@ then OTHER_ARGS+=" -jmxport $JMX_PORT" + if $cygwin; then + KERNEL_HOME=$(cygpath -wp $KERNEL_HOME) + CONFIG_DIR=$(cygpath -wp $CONFIG_DIR) + fi + exec $JAVA_HOME/bin/java $JAVA_OPTS $JMX_OPTS \ -classpath $CLASSPATH \ -Dorg.eclipse.virgo.kernel.home=$KERNEL_HOME \ diff --git a/build-kernel/bin/shutdown.sh b/build-kernel/bin/shutdown.sh index aac5ff4..7f36fbe 100755 --- a/build-kernel/bin/shutdown.sh +++ b/build-kernel/bin/shutdown.sh @@ -17,4 +17,13 @@ done SCRIPT_DIR=`dirname $SCRIPT` EXECUTABLE="dmk.sh" +# +# identify yourself when running under cygwin +# +cygwin=false +case "$(uname)" in + CYGWIN*) cygwin=true ;; +esac +export cygwin + exec "$SCRIPT_DIR"/"$EXECUTABLE" stop "$@" diff --git a/build-kernel/bin/startup.sh b/build-kernel/bin/startup.sh index 20f721e..b7d194e 100755 --- a/build-kernel/bin/startup.sh +++ b/build-kernel/bin/startup.sh @@ -17,4 +17,13 @@ done SCRIPT_DIR=`dirname $SCRIPT` EXECUTABLE="dmk.sh" +# +# identify yourself when running under cygwin +# +cygwin=false +case "$(uname)" in + CYGWIN*) cygwin=true ;; +esac +export cygwin + exec "$SCRIPT_DIR"/"$EXECUTABLE" start "$@" |

