]> #!/bin/bash echo "hello from neuca script" echo StrictHostKeyChecking no >> /etc/ssh/ssh_config echo $CondorMaster.IP("Link1") condor-master condor-master.orca >> /etc/hosts for i in {100..200}; do name=$(($i - 100)) echo `echo $self.IP("Link1") | sed 's/.[0-9][0-9]*$//g'`.$i condor-w$name condor-w$name\.orca >> /etc/hosts done # echo condor-master > /etc/hostname /bin/hostname -F /etc/hostname /etc/init.d/condor stop cp /etc/condor/condor_config.master.local /etc/condor/condor_config.local echo 'CONDOR_HOST = condor-master.orca' >> /etc/condor/condor_config.local echo 'DEFAULT_DOMAIN_NAME = orca' >> /etc/condor/condor_config.local /etc/init.d/condor start # #!/bin/bash function testSSH() { local user=${1} local host=${2} local timeout=${3} SSH_OPTS="-q -o PreferredAuthentications=publickey -o HostbasedAuthentication=no -o PasswordAuthentication=no -o StrictHostKeyChecking=no" ssh -q -q $SSH_OPTS -o "BatchMode=yes" -o "ConnectTimeout ${timeout}" ${user}@${host} "echo 2>&1" && return 0 || return 1 } echo "hello from neuca script" echo $CondorMaster.IP("Link1") condor-master condor-master.orca >> /etc/hosts for i in {100..200}; do name=$(($i - 100)) echo `echo $self.IP("Link1") | sed 's/.[0-9][0-9]*$//g'`.$i condor-w$name condor-w$name\.orca >> /etc/hosts done ip_end=`echo $self.IP("Link1") | sed 's/^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.//g'` name=$(($ip_end - 100)) host_name=condor-w$name echo $host_name > /etc/hostname /bin/hostname -F /etc/hostname # wait until the condor-master is pingable UNPINGABLE=true for ((i=0;i<60;i+=1)); do echo "testing ping, try: $i " >> /tmp/bootscript.out PING=`ping -c 3 condor-master > /dev/null 2>&1` if [ "$?" = "0" ]; then UNPINGABLE=false break fi sleep 10 done UNSSHABLE=true for ((i=0;i<60;i+=1)); do echo "testing ssh, try: $i" >> /tmp/bootscript.out testSSH root condor-master 5 if [ "$?" = "0" ]; then UNSSHABLE=false break fi sleep 10 done orca_name=$self.Name() echo $orca_name ssh condor-master "echo $orca_name > /tmp/$host_name" /etc/init.d/condor stop cp /etc/condor/condor_config.worker.local /etc/condor/condor_config.local echo 'CONDOR_HOST = condor-master.orca' >> /etc/condor/condor_config.local echo 'DEFAULT_DOMAIN_NAME = orca' >> /etc/condor/condor_config.local echo 'ALLOW_ADMINISTRATOR = *' >> /etc/condor/condor_config.local echo 'ALLOW_OWNER = *' >> /etc/condor/condor_config.local /etc/init.d/condor start 2 8eefd8b0a311add05fd5ce7bf4c9eb0d264e3dce http://geni-images.renci.org/images/GEC-demos/GEC17/GEC17-v0.1.xml 10000000 255.255.255.0 172.16.42.1 172.16.42.100 255.255.255.0 14