diff options
Diffstat (limited to 'rel/overlay/bin/remsh')
-rwxr-xr-x | rel/overlay/bin/remsh | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/rel/overlay/bin/remsh b/rel/overlay/bin/remsh index d6028b42..39955ae8 100755 --- a/rel/overlay/bin/remsh +++ b/rel/overlay/bin/remsh @@ -12,15 +12,16 @@ # License for the specific language governing permissions and limitations under # the License. -if test ! $1 ; then - echo "usage: $0 nodename" - exit 1 -fi +NAME="remsh$$" +REM_NODE="{{node_name}}" +NAME_TYPE=${REM_NODE% *} +REM_NODE=${REM_NODE#* } +HOST=`echo "$REM_NODE" | grep -o "@.*" | sed 's/@//'` -if test `echo $1 | sed 's/[^@]//g'`; then - NAME="-name $1" +if test -n $HOST; then + NAME="$NAME_TYPE $NAME@$HOST" else - NAME="-sname $1" + NAME="$NAME_TYPE $NAME" fi ERTS_BIN_DIR=$(cd ${0%/*} && pwd) @@ -33,9 +34,6 @@ START_CLEAN="${ROOTDIR}/releases/${APP_VSN}/start_clean" BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin -REM_NODE="{{node_name}}" -REM_NODE=${REM_NODE#* } - -COOKIE="-setcookie monster" +COOKIE="{{cookie}}" exec $BINDIR/erl $NAME -remsh $REM_NODE $COOKIE -hidden -boot $START_CLEAN |