source: fedkit/fed_bootstrap @ 4c931af

axis_examplecompt_changesinfo-opsversion-3.01version-3.02
Last change on this file since 4c931af was 7c3008e, checked in by Ted Faber <faber@…>, 17 years ago

checkpoint

  • 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 *.patch; 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 "$1" "$2"
Note: See TracBrowser for help on using the repository browser.