diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl index b3c12e4f388..67f8bc32158 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl +++ b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl @@ -13,9 +13,7 @@ $port = $ARGV[0]; $timeout = $ARGV[1]; -$packaged_as = $ARGV[2]; -$clientUserID = $ARGV[3]; - +$clientUserID = $ARGV[2]; $dir= $ENV{PWD}; #print("path $dir"); @@ -28,18 +26,7 @@ $ENV{A_PLUGIN_PATH}="$plugins_dir/"; $oldClasspath = $ENV{CLASSPATH}; -if ($packaged_as eq "jar") -{ - $ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath"; -} -if ($packaged_as eq "src") -{ - $ENV{"CLASSPATH"}="$plugins_dir:$oldClasspath"; -} -if (!defined($packaged_as)) -{ - $ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath"; -} +$ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath"; if (!defined($timeout)) { diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh index 3c797124a66..9df8e694984 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh +++ b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh @@ -1,20 +1,44 @@ #!/bin/sh #******************************************************************************* -# Copyright (c) 2005, 2006 IBM Corporation and others. +# Copyright (c) 2005, 2008 IBM Corporation, Wind River Systems, Inc. and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html # # Contributors: -# IBM Corporation - initial API and implementation +# IBM Corporation - initial API and implementation +# Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement) +# Patrick Juhl - Fix for unix (Parameters for port selection) +# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters #******************************************************************************* # Shell script to start an RSE communications server # This script will start the datastore server listening on an available socket serverpath=.; + CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH; export serverpath CLASSPATH -if [ $1 ] -then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 & -else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 & + + +port=0; +timeout=60000; +clientUserID=$USER; + +if [ $# -gt 2 ]; then + clientUserID=$3 +fi +if [ $# -gt 1 ]; then + timeout=$2 fi +if [ $# -gt 0 ]; then + port=$1 +fi + +case x$port in + x-h*) echo "Usage: server.sh [port] [timeout] [clientUserId]" + exit 0 + ;; +esac + +java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout & + diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl index cfe194ab8ea..ffb915d1057 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl +++ b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl @@ -24,7 +24,7 @@ $isHelp = $helpFlag cmp $port; if ($isHelp == 0) { print("command usage:\n"); - print("daemon.linux [ | -] [ -]\n"); + print("daemon.pl [ | -] [ -]\n"); 0; } else diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh index a51ee07c10e..9df8e694984 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh +++ b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh @@ -1,6 +1,6 @@ #!/bin/sh #******************************************************************************* -# Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others. +# Copyright (c) 2005, 2008 IBM Corporation, Wind River Systems, Inc. and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -10,13 +10,35 @@ # IBM Corporation - initial API and implementation # Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement) # Patrick Juhl - Fix for unix (Parameters for port selection) +# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters #******************************************************************************* # Shell script to start an RSE communications server # This script will start the datastore server listening on an available socket serverpath=.; + CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH; export serverpath CLASSPATH -if [ $1 ] -then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $1 & -else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 & + + +port=0; +timeout=60000; +clientUserID=$USER; + +if [ $# -gt 2 ]; then + clientUserID=$3 +fi +if [ $# -gt 1 ]; then + timeout=$2 fi +if [ $# -gt 0 ]; then + port=$1 +fi + +case x$port in + x-h*) echo "Usage: server.sh [port] [timeout] [clientUserId]" + exit 0 + ;; +esac + +java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout & +