- Timestamp:
- Nov 5, 2008 1:38:10 AM (16 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 2dafa0c
- Parents:
- 2c6128f
- Location:
- fedkit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/Makefile
r2c6128f r9c166cf 1 BINARIES=fed _bootstrap federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \1 BINARIES=federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \ 2 2 make_hosts fed-tun.pl fed-tun.ucb.pl fed_evrepeater 3 3 PATCHES=rc.accounts.patch 4 4 5 fedkit.tgz: 5 fedkit.tgz: ${BINARIES} ${PATCHES} 6 6 mkdir -p /tmp/fedkit/local/federation/bin 7 7 mkdir -p /tmp/fedkit/local/federation/etc … … 9 9 cp ${PATCHES} /tmp/fedkit/local/federation/etc 10 10 tar czf fedkit.tgz -C /tmp/fedkit local 11 rm -rf /tmp/fedkit$$ 11 rm -rf /tmp/fedkit 12 13 clean: 14 rm -f fedkit.tgz -
fedkit/federate.sh
r2c6128f r9c166cf 58 58 PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'` 59 59 EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'` 60 SCRIPTDIR="/proj/$PROJECT/exp/$EXP/tmp" 60 CONFIGDIR="/proj/$PROJECT/exp/$EXP/tmp" 61 SCRIPTDIR="/usr/local/federation/bin" 61 62 62 63 # Die if Scripts are not where they should be. NB, this is checked by the 63 64 # bootstrapper, too, so a failure here is unlikely. 64 if [ -z "$ SCRIPTDIR" ] ; then65 echo "Can't find federation scripts. Tmcc status says:"65 if [ -z "$CONFIGDIR" ] ; then 66 echo "Can't find federation configs. Tmcc status says:" 66 67 $EMUDIR/tmcc -b status 67 68 exit 1; … … 70 71 # Get our gateway, share, and mount user from the configuration file. 71 72 # There's probably a way to get all three at once, but this works. 72 GATEWAY=`$PERL -ne '/ControlGateway:\s+(.*)/i && print "$1\n";' $ SCRIPTDIR/client.conf`73 SHARE=`$PERL -ne '/SMBShare:\s+(.*)/i && print "$1\n";' $ SCRIPTDIR/client.conf`74 SMBUSER=`$PERL -ne '/ProjectUser:\s+(.*)/i && print "$1\n";' $ SCRIPTDIR/client.conf`75 SMBPROJECT=`$PERL -ne '/ProjectName:\s+(.*)/i && print "$1\n";' $ SCRIPTDIR/client.conf`73 GATEWAY=`$PERL -ne '/ControlGateway:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf` 74 SHARE=`$PERL -ne '/SMBShare:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf` 75 SMBUSER=`$PERL -ne '/ProjectUser:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf` 76 SMBPROJECT=`$PERL -ne '/ProjectName:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf` 76 77 77 78 # XXX: modified seer daemon to read a config file. Not in the tarfile yet. If … … 88 89 # Copy the seer.conf to the local /tmp if there is one 89 90 90 if [ -e $ SCRIPTDIR/seer.conf ]; then91 /bin/cp $ SCRIPTDIR/seer.conf /tmp91 if [ -e $CONFIGDIR/seer.conf ]; then 92 /bin/cp $CONFIGDIR/seer.conf /tmp 92 93 fi 93 94 … … 97 98 # localhost entry that's aliased to this host's name. 98 99 grep 127\\.0\\.0\\.1 /etc/hosts > /tmp/hosts 99 cat "$ SCRIPTDIR/hosts" >> /tmp/hosts100 cat "$CONFIGDIR/hosts" >> /tmp/hosts 100 101 # If there's no node in this experiment called control, fake one so 101 102 # that SEER events get through (if SEER's in use) 102 if ! grep -q control $ SCRIPTDIR/hosts; then103 if ! grep -q control $CONFIGDIR/hosts; then 103 104 echo "$GWIP control.$EXP.$PROJECT" >> /tmp/hosts 104 105 fi … … 110 111 # fragile and needs to change. To make matters worse, our FBSD62-SMB images 111 112 # contain the patched rc.accounts, so this patching step will fail there. 112 cd "$EMUDIR/rc" 113 patch -f < /tmp/rc.accounts.patch 114 cd /tmp 113 114 if [ -e /usr/local/federation/etc/rc.accounts.patch ]; then 115 cd "$EMUDIR/rc" 116 patch -f < /usr/local/federation/etc/rc.accounts.patch 117 cd /tmp 118 fi 115 119 116 120 # … … 167 171 # 168 172 echo "Mounting via SMB." 169 $PERL "/ tmp/$SMBMOUNT" $SHARE $GATEWAY $SMBUSER $SMBPROJECT173 $PERL "/usr/local/federation/bin/$SMBMOUNT" $SHARE $GATEWAY $SMBUSER $SMBPROJECT 170 174 171 175 echo "Restoring old bossnode" -
fedkit/make_hosts
r2c6128f r9c166cf 17 17 PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'` 18 18 EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'` 19 SCRIPTDIR="/proj/$PROJECT/exp/$EXP/tmp" 19 CONFIGDIR="/proj/$PROJECT/exp/$EXP/tmp" 20 SCRIPTDIR="/usr/local/federation/bin" 20 21 21 22 # Very simple script to copy the global hosts file over the local one … … 50 51 # Copy the seer.conf to the local /tmp if there is one 51 52 52 if [ -e $ SCRIPTDIR/seer.conf ]; then53 /bin/cp $ SCRIPTDIR/seer.conf /tmp53 if [ -e $CONFIGDIR/seer.conf ]; then 54 /bin/cp $CONFIGDIR/seer.conf /tmp 54 55 fi 55 56
Note: See TracChangeset
for help on using the changeset viewer.