X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=pl-podzap;fp=pl-podzap;h=9cfcbcb7352a3c934a71e3e02dfa3dc83f22ceee;hb=93f0412887322c8f7f38ec71d6a57d5b3ddd9260;hp=0000000000000000000000000000000000000000;hpb=2df2fbe518d5a221ce6e3ee88a3fb23fb1b94b27;p=pingofdeath.git diff --git a/pl-podzap b/pl-podzap new file mode 100755 index 0000000..9cfcbcb --- /dev/null +++ b/pl-podzap @@ -0,0 +1,41 @@ +#! /bin/bash +Invocation="pl-podzap TargetHostName" +# Fetches the hash code from the saved hash code file and commands +# the specified PlanetLab node to send +# the properly constructed ICMP message to the remote node to +# reset it. +# ----------------------------------------------------------------- +# $Header: /shareddata/CVS/planetlab/admin/ipod/pl-podzap,v 1.4 2003/01/18 01:43:48 radams Exp $ +# +# Copyright (c) 2003 Intel Corporation +# All rights reserved. +# This file is distributed under the terms in the attached INTEL_LICENSE +# file. If you do not find this file, a copy can be obtained by +# writing to Intel Research Berkeley; Attention: Intel License Inquiry; +# 2150 Shattuck Avenue, suite 1300; Berkeley, CA 94704 +# ----------------------------------------------------------------- + +TARGETIP=$1 + +if [[ x$TARGETIP == x ]] ; then + echo "Invocation: $Invocation" + exit 1 +fi + +PLBIN="/usr/local/planetlab/bin" +HASHFILE="./HashFile" + +set `grep "$TARGETIP" $HASHFILE` +DATEE=$1 +HOSTIP=$2 +TARGETIPP=$3 +HASHCODE=$4 + +if [[ x$HASHCODE != x ]] ; then + echo "DATEE=$DATEE, HOSTIP=$HOSTIP, TARGETIPP=$TARGETIPP, HASHCODE = '$HASHCODE'" + + ssh idsl1@$HOSTIP "echo $HASHCODE | sudo $PLBIN/pl-poddoit -i - $TARGETIP" +else + echo "No hash code found for specified target node" +fi +