#! /bin/sh # # This script is for starting up the MX server for the ADSC goniostat # and then initializing it. # if [ x$MXDIR = x ]; then MXDIR=/opt/mx fi if [ x$MXPORT = x ]; then MXPORT=9727 fi MXSERVER=${MXDIR}/sbin/mxserver MXPUT=${MXDIR}/bin/mxput LD_LIBRARY_PATH=${MXDIR}/lib DYLD_LIBRARY_PATH=${MXDIR}/lib SHLIB_PATH=${MXDIR}/lib export MXDIR LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH if [ -x $MXSERVER ]; then $MXSERVER -p $MXPORT -f ./testserver.dat -C ./testserver.acl $* else echo "Error: The server '$MXSERVER' is not executable. Aborting..." fi # # We must wait until the MX server has finished starting up before # sending it the mxput commands below. The MX server does not currently # give a simple way of letting you know that it is up other than trying # to connect to the socket. # # The first part of this is for the sake of the MX Compumotor driver. $MXPUT localhost:6k_rs232.putline "EOT13,10,0" $MXPUT localhost:6k_rs232.putline "ERRLVL1" $MXPUT localhost:6k_rs232.putline "MA1" $MXPUT localhost:6k_rs232.putline "ECHO0" $MXPUT localhost:6k_rs232.discard_unread_input 1 $MXPUT localhost:6k_rs232.discard_unwritten_output 1 # The rest of this is ADSC specific. $MXPUT localhost:6k_rs232.putline "MINIT"