1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +02:00

provider server defs according to OS types

This commit is contained in:
David Dykstal 2006-04-26 17:59:55 +00:00
parent f5ff3745ae
commit f52702305d
18 changed files with 151 additions and 31 deletions

View file

@ -0,0 +1,48 @@
#!/usr/bin/perl -w
use Shell;
if (!defined($ARGV[0]) || !defined($ARGV[1]) || !defined($ARGV[2]) || !defined($ARGV[3]) || !defined($ARGV[4]))
{
print("command usage:\n");
print("auth.pl USER, PATH, PORT, TIMEOUT, TICKET\n");
}
else
{
$userIN = $ARGV[0];
$pathIN = $ARGV[1];
$portIN = $ARGV[2];
$timeoutIN = $ARGV[3];
$ticketIN = $ARGV[4];
$pwdIN = <STDIN>;
chomp($pwdIN);
@passwdStruct = getpwnam($userIN);
if (@passwdStruct == 0)
{
print("invalid user name\n");
0;
}
else
{
$passwd=$passwdStruct[1];
$encryptedPWD = crypt($pwdIN, $passwd);
$classpath=$ENV{CLASSPATH};
$suOptions="-";
if ($passwd eq $encryptedPWD)
{
print("success\n");
system("su $suOptions $userIN -c 'java -cp $classpath -DA_PLUGIN_PATH=$pathIN org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
1;
}
else
{
print("incorrect password\n");
0;
}
}
}

View file

@ -5,4 +5,5 @@
export serverpath=.;
export PATH=/usr/java131/jre/bin:$PATH
export CLASSPATH=/usr/java131/jre/lib/rt.jar:/usr/jdk_base/lib/classes.zip:$CLASSPATH
export CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:universalminers.jar:clientserver.jar:$CLASSPATH;java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false com.ibm.etools.systems.dstore.core.server.Server 0 60000 &
export CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH;
java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false com.ibm.etools.systems.dstore.core.server.Server 0 60000 &

View file

@ -0,0 +1,44 @@
#!/usr/bin/perl -w
$port = "4035";
$helpFlag = "-h";
if (defined($ARGV[0]))
{
$port = $ARGV[0];
}
$isHelp = $helpFlag cmp $port;
if ($isHelp == 0)
{
print("command usage:\n");
print("daemon.linux [<port> | <low port>-<high port>]\n");
0;
}
else
{
$trace = $ENV{DSTORE_TRACING_ON};
$user=`whoami`; chomp($user);
$match = $user cmp "root";
if ($match != 0)
{
print("To run the server daemon, you must be root\n");
0;
}
else
{
$dir= $ENV{PWD};
$plugins_dir=$dir;
$ENV{A_PLUGIN_PATH}="$plugins_dir/";
$oldClasspath = $ENV{CLASSPATH};
$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";
system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port");
}
}

View file

@ -0,0 +1,57 @@
#!/usr/bin/perl -w
use Shell;
if (!defined($ARGV[0]) || !defined($ARGV[1]) || !defined($ARGV[2]) || !defined($ARGV[3]) || !defined($ARGV[4]))
{
print("command usage:\n");
print("auth.pl USER, PATH, PORT, TIMEOUT, TICKET\n");
}
else
{
$userIN = $ARGV[0];
$pathIN = $ARGV[1];
$portIN = $ARGV[2];
$timeoutIN = $ARGV[3];
$ticketIN = $ARGV[4];
$pwdIN = <STDIN>;
chomp($pwdIN);
@passwdStruct = getpwnam($userIN);
if (@passwdStruct == 0)
{
print("invalid user name\n");
0;
}
else
{
$passwd=$passwdStruct[1];
$encryptedPWD = crypt($pwdIN, $passwd);
$classpath=$ENV{CLASSPATH};
$suOptions="-p";
if ($passwd eq $encryptedPWD)
{
print("success\n");
$os = uname();
chomp($os);
if (lc($os) eq "aix")
{
$suOptions="-";
}
system("su $suOptions $userIN -c 'java -cp $classpath -DA_PLUGIN_PATH=$pathIN org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
1;
}
else
{
print("incorrect password\n");
0;
}
}
}

View file

@ -1,15 +0,0 @@
#!/bin/sh
#
# Shell script to start RSE communications server
# This script will start the datastore listening on any socket
# that's available.
#
. setup.env.zseries
export serverpath=.;
export CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:universalminers.jar:clientserver.jar:$CLASSPATH;
if [ $1 ]
then java -DA_PLUGIN_PATH=$serverpath -Dclient.username=$1 org.eclipse.dstore.core.server.Server 0 60000 &
else java -DA_PLUGIN_PATH=$serverpath org.eclipse.dstore.core.server.Server 0 60000 &
fi

View file

@ -1,15 +0,0 @@
#!/bin/sh
#
# QShell script to start RSE communications server
# Usage: runServer portNumber socketTimeOut
#
export JAVA_HOME=/sysroot/usr/lpp/java/IBM/J1.3
SHELL=/bin/sh
TZ=EST5EDT
LANG=C
export PATH=$PATH:/bin:.:/usr/sbin:/sysroot/usr/lpp/internet/bin:/sysroot/usr/lpp/internet/sbin:$JAVA_HOME/bin:$JAVA_HOME/bin/
export _CEE_RUNOPTS="ALL31(ON) HEAP(32M,32K,ANYWHERE,KEEP)"