source: fedkit/fed_bootstrap @ 33e3537

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since 33e3537 was 4abace9, checked in by Ted Faber <faber@…>, 17 years ago

Changes to imporve reliability of routes coming up. Restructuring of
federate leaves the stsyem in a state where we can safely restart the router
(specifically, talking to the local boss again) and we restart it in the
final topology. This introduces a lag in routing actually being established.
It may be useful to add a lag to the startcmd to take this into account.

  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/bin/sh
2
3# Bootstrap cleint federation set up.  Move federation scripts to /tmp and
4# execute them from there.  Because those scripts unmount significant hunks of
5# the file system - including the directories in which the scripts are
6# initially stored - unpredictable behavior can result unless we're careful not
7# to be depending on any of those directories.
8
9# Emulab scripts directory
10EMUDIR="/usr/local/etc/emulab/"
11
12# Find this experiment's stashed scripts.  (Perl for advanced parsing)
13SCRIPTDIR=`$EMUDIR/tmcc -b status | perl -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "/proj/$1/exp/$2/tmp\n";'`
14
15
16# Die if federation scripts are not where they're supposed to be.
17if [ -z "$SCRIPTDIR" ] ; then
18    echo "Can't find federation scripts.  Tmcc status says:"
19    $EMUDIR/tmcc -b status
20    exit 1;
21fi
22
23# The copy
24for f in federate.sh smbmount.pl; do 
25        cp $SCRIPTDIR/$f /tmp && chmod 755 /tmp/$f
26done
27
28# Move to a safe directory and overwrite this process with the actual
29# federation script, and run it.
30cd /tmp
31exec /tmp/federate.sh
Note: See TracBrowser for help on using the repository browser.