All pastes #1844287 Raw Edit

Mine

public shellscript v1 · immutable
#1844287 ·published 2010-03-18 03:34 UTC
rendered paste body
#!/bin/sh# The default rule assumes that the nodes are connected to the PDU andswitch# located in the same rack.  Only the exceptions need to be# explicitly listed here.for ip in $@ ; do   hostname=`nslookup $ip | grep "name =" | awk '{print $4}' | sed -e's/\.local\.$//' `   case $hostname in       compute-14-3) rack="/Rack15" ;;       *)           rack=`echo $hostname | sed -e's/^[a-z]*-\([0-9]*\)-[0-9]*.*/\/Rack\1/'`           ;;       esac       echo $rackdone