axis_examplecompt_changesinfo-opsversion-2.00version-3.01version-3.02
Last change
on this file since 4702322 was
7c3008e,
checked in by Ted Faber <faber@…>, 17 years ago
|
checkpoint
|
-
Property mode set to
100755
|
File size:
1.0 KB
|
Rev | Line | |
---|
[4abace9] | 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 |
---|
| 10 | EMUDIR="/usr/local/etc/emulab/" |
---|
| 11 | |
---|
| 12 | # Find this experiment's stashed scripts. (Perl for advanced parsing) |
---|
| 13 | SCRIPTDIR=`$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. |
---|
| 17 | if [ -z "$SCRIPTDIR" ] ; then |
---|
| 18 | echo "Can't find federation scripts. Tmcc status says:" |
---|
| 19 | $EMUDIR/tmcc -b status |
---|
| 20 | exit 1; |
---|
| 21 | fi |
---|
| 22 | |
---|
| 23 | # The copy |
---|
[f3691ff] | 24 | for f in federate.sh smbmount*.pl *.patch; do |
---|
[4abace9] | 25 | cp $SCRIPTDIR/$f /tmp && chmod 755 /tmp/$f |
---|
| 26 | done |
---|
| 27 | |
---|
| 28 | # Move to a safe directory and overwrite this process with the actual |
---|
| 29 | # federation script, and run it. |
---|
| 30 | cd /tmp |
---|
[7c3008e] | 31 | exec /tmp/federate.sh "$1" "$2" |
---|
Note: See
TracBrowser
for help on using the repository browser.