| | 2 | |
| | 3 | # find perl |
| | 4 | if [ -x "/usr/bin/perl" ]; then |
| | 5 | PERL="/usr/bin/perl" |
| | 6 | else |
| | 7 | if [ -x "/usr/local/bin/perl" ]; then |
| | 8 | PERL="/usr/local/bin/perl" |
| | 9 | else |
| | 10 | # Wing it... |
| | 11 | PERL="perl" |
| | 12 | fi |
| | 13 | fi |
| | 14 | |
| | 15 | # Find this experiment's stashed scripts. (Perl for advanced parsing) |
| | 16 | EMUDIR="/usr/local/etc/emulab/" |
| | 17 | PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'` |
| | 18 | EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'` |
| | 19 | SCRIPTDIR="/proj/$PROJECT/exp/$EXP/tmp" |
| | 38 | |
| | 39 | # XXX: modified seer daemon to read a config file. Not in the tarfile yet. If |
| | 40 | # we see one, and there's a /usr/seer/backend/daemon.py, replace that one with |
| | 41 | # the local one. |
| | 42 | if [ -e /usr/seer/backend/daemon.py ] && [ -e $SCRIPTDIR/daemon.py ]; then |
| | 43 | /bin/cp $SCRIPTDIR/daemon.py /usr/seer/backend/daemon.py |
| | 44 | fi |
| | 45 | |
| | 46 | if [ -e /usr/seer/backend/experiment-setup.py ] && [ -e $SCRIPTDIR/experiment-setup.py ]; then |
| | 47 | /bin/cp $SCRIPTDIR/experiment-setup.py /usr/seer/backend/experiment-setup.py |
| | 48 | fi |
| | 49 | |
| | 50 | # Copy the seer.conf to the local /tmp if there is one |
| | 51 | |
| | 52 | if [ -e $SCRIPTDIR/seer.conf ]; then |
| | 53 | /bin/cp $SCRIPTDIR/seer.conf /tmp |
| | 54 | fi |
| | 55 | |