Skip to content

Commit

Permalink
work on #2425 : added a SingleJVM mode and support for update.rc-d
Browse files Browse the repository at this point in the history
 - fixed greedy replacements in install.sh
 - fixed protocol detection command
(cherry picked from commit 336cc30)
  • Loading branch information
fviale committed Jan 27, 2016
1 parent 2602ae2 commit 8080a17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ escape_rhs_sed ()

}

sed "s/USER=.*/USER=$USER/g" -i "/etc/init.d/proactive-scheduler"
sed "s/PROTOCOL=.*/PROTOCOL=$PROTOCOL/g" -i "/etc/init.d/proactive-scheduler"
sed "s/PORT=.*/PORT=$PORT/g" -i "/etc/init.d/proactive-scheduler"
sed "s/NB_NODES=.*/NB_NODES=$NB_NODES/g" -i "/etc/init.d/proactive-scheduler"
sed "s/PA_ROOT=.*/PA_ROOT=$(escape_rhs_sed "$PA_ROOT")/g" -i "/etc/init.d/proactive-scheduler"
sed -e "s/^USER=.*/USER=$USER/g" -i "/etc/init.d/proactive-scheduler"
sed -e "s/^PROTOCOL=.*/PROTOCOL=$PROTOCOL/g" -i "/etc/init.d/proactive-scheduler"
sed -e "s/^PORT=.*/PORT=$PORT/g" -i "/etc/init.d/proactive-scheduler"
sed -e "s/^NB_NODES=.*/NB_NODES=$NB_NODES/g" -i "/etc/init.d/proactive-scheduler"
sed -e "s/^PA_ROOT=.*/PA_ROOT=$(escape_rhs_sed "$PA_ROOT")/g" -i "/etc/init.d/proactive-scheduler"

if confirm "Start ProActive Nodes in a single JVM process (y) or multiple JVM Processes (n) ? [Y/n] " ; then
sed "s/SINGLE_JVM=.*/SINGLE_JVM=true/g" -i "/etc/init.d/proactive-scheduler"
sed -e "s/^SINGLE_JVM=.*/SINGLE_JVM=true/g" -i "/etc/init.d/proactive-scheduler"
fi

chmod 700 /etc/init.d/proactive-scheduler
Expand Down
4 changes: 3 additions & 1 deletion tools/proactive-scheduler
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ waitForCompletion() {

createnodes() {
echo Creating local nodes ...
PA_PROTOCOL=$(grep 'proactive.communication.protocol' "$PROACTIVE_HOME/config/network/server.ini" | sed "s/proactive\.communication\.protocol=\(.*\)/\1/g")
PA_PROTOCOL=$( grep -e '^proactive.communication.protocol=' "$PROACTIVE_HOME/config/network/server.ini" | sed -e "s/^proactive\.communication\.protocol=\(.*\)/\1/g" )
PA_PROTOCOL=$(echo $PA_PROTOCOL| xargs)

if [[ "$PA_PROTOCOL" == "pnp" ]]; then
PA_URL=pnp://${ALIAS}:64738
elif [[ "$PA_PROTOCOL" == "pamr" ]]; then
Expand Down

0 comments on commit 8080a17

Please sign in to comment.