-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
if [ -f $fileOmniConfig ]; then
- export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ export OMNIORB_CONFIG
fi
currentPort=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-#!/bin/bash
+#!/bin/sh
./KillCurrentPort
-#!/bin/bash
+#!/bin/sh
#
# --- run command in SALOME environment from remote call, ssh or rsh
# - SALOME configuration is defined by :
# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
-export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg
-export NSHOST=$1
-export NSPORT=$2
+OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg
+export OMNIORB_CONFIG
+NSHOST=$1
+export NSHOST
+NSPORT=$2
+export NSPORT
initref="NameService=corbaname::"$1":$2"
echo "ORBInitRef $initref" > $OMNIORB_CONFIG
shift 2
-${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile $HOME/$APPLI/.bashrc -c "$*"
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile $HOME/$APPLI/.bashrc -c "$*"
-#!/bin/bash
+#!/bin/sh
#
# Useful shell to run executable progs or shells under Salome env
# Use it with args to run a program : runSession python -i myprog.py
fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
if [ -f $fileOmniConfig ]; then
- export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ export OMNIORB_CONFIG
# --- set environment variables for port and hostname of NamingService
- export NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
- export NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
+ NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
+ export NSHOST
+ NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
+ export NSPORT
fi
# --- invoque shell with or without args
if [ $# -ne 0 ] ; then
- ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
else
- ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc
fi
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
if [ -z "$aRes" ]; then
echo ${NSPORT} - Ok
local myhost=`hostname`
- export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+ export OMNIORB_CONFIG
export NSPORT
- export NSHOST=${myhost}
+ NSHOST=${myhost}
+ export NSHOST
local initref="NameService=corbaname::"`hostname`":$NSPORT"
#echo "ORBInitRef $initref" > $OMNIORB_CONFIG
echo "InitRef = $initref" > $OMNIORB_CONFIG
- export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
+ LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
+ export LAST_RUNNING_CONFIG
rm ${LAST_RUNNING_CONFIG}
ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
break
searchFreePort
if [ $# -ne 0 ] ; then
- ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
else
- ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc
fi
rm ${OMNIORB_CONFIG}
-#!/bin/bash
+#!/bin/sh
# --- define port for CORBA naming service
searchFreePort() {
echo -n "Searching for a free port for naming service: "
- export NSPORT=2810
+ NSPORT=2810
+ export NSPORT
local limit=$NSPORT
let limit=limit+100
while [ 1 ]
if [ -z "$aRes" ]; then
echo ${NSPORT} - Ok
local myhost=`hostname`
- export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+ export OMNIORB_CONFIG
export NSPORT
- export NSHOST=${myhost}
+ NSHOST=${myhost}
+ export NSHOST
local initref="NameService=corbaname::"`hostname`":$NSPORT"
#echo "ORBInitRef $initref" > $OMNIORB_CONFIG
echo "InitRef = $initref" > $OMNIORB_CONFIG
- export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ export LAST_RUNNING_CONFIG
rm ${LAST_RUNNING_CONFIG}
ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
break
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
# on sarge, "which" gives not allways the absolute path...