Changeset 63f7c7e for fedkit/federate.sh


Ignore:
Timestamp:
Sep 4, 2007 6:52:58 PM (17 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
c23025e
Parents:
61f19e0
Message:

add hosts fixup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/federate.sh

    r61f19e0 r63f7c7e  
    33BOSSNODE="/usr/local/etc/emulab/bossnode"
    44# GATEWAY="detertunnel"
     5
     6PORTS="139 7777"
     7NC="/usr/bin/nc"
     8RCDIR="/usr/local/etc/emulab/rc"
     9
     10RCACCT="rc.accounts"
     11SMBMOUNT="smbmount.pl"
    512
    613if [ -f $BOSSNODE ]
     
    1017
    1118EMUDIR="/usr/local/etc/emulab/"
     19
     20# Find this experiment's stashed scripts.  (Perl for advanced parsing)
     21SCRIPTDIR=`$EMUDIR/tmcc -b status | perl -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "/proj/$1/exp/$2/tmp\n";'`
     22
     23# Die if things are weird
     24if [ -z "$SCRIPTDIR" ] ; then
     25    echo "Can't find federation scripts.  Tmcc status says:"
     26    $EMUDIR/tmcc -b status
     27    exit 1;
     28fi
     29
     30# Move the SMB mounting script out of NFS so we can call it after the umount
     31cp "$SCRIPTDIR/$SMBMOUNT" /tmp
     32
     33# Copy the global hostnames file into /etc/hosts so this node can address
     34# others in the experiment on other testbeds.
     35grep 127\\.0\\.0\\.1 /etc/hosts > /tmp/hosts
     36cat "$SCRIPTDIR/hosts" >> /tmp/hosts
     37cp /tmp/hosts /etc/hosts && rm /tmp/hosts
     38
    1239GATEWAY=`$EMUDIR/tmcc -b syncserver | awk ' { match($0, /SERVER=[^[:space:]]+/); print substr($0,RSTART+8,RLENGTH-9);}'`
    13 
    14 PORTS="139 7777"
    15 NC="/usr/bin/nc"
    16 RCDIR="/usr/local/etc/emulab/rc"
    17 
    18 RCACCT="rc.accounts"
    19 SMBMOUNT="smbmount.pl"
    2040
    2141#
     
    4363echo $GATEWAY > $BOSSNODE
    4464
     65
    4566#
    4667# Unmount stuff before messing with accounts
     
    6081echo "Mounting via SMB."
    6182
    62 exec $EMUDIR/$SMBMOUNT
     83exec "/tmp/$SMBMOUNT"
Note: See TracChangeset for help on using the changeset viewer.