#!/bin/bash # $HeadURL$ $LastChangedRevision$ PROGNAME=`basename $0` echo "defining functions ..." invert_rc() { local CMD RC CMD="$1" { sh -c "$CMD" && RC=$?; } || RC=$? [ $RC != 0 ] } echo "creating config file ..." { echo "z:AllHosts,zHosts" echo "zz:AllHosts,zHosts" echo "y02:AllHosts,OhTwoHosts" echo "z02:AllHosts,zHosts,OhTwoHosts,z02Hosts" echo "Z:AllHosts,ZHosts" echo "ZZ:AllHosts,ZHosts" echo "Z02:AllHosts,ZHosts,OhTwoHosts,Z02Hosts" echo "zZ:AllHosts,zHosts,ZHosts" echo "z02Z02:AllHosts,zHosts,ZHosts,OhTwoHosts,Z02Hosts,z02Hosts" } > /tmp/$PROGNAME.conf echo "listing all hosts ..." rocon -F /tmp/$PROGNAME.conf -m AllHosts echo "listing Z hosts" rocon -F /tmp/$PROGNAME.conf -m ZHosts echo "listing z hosts" rocon -F /tmp/$PROGNAME.conf -m zHosts echo "listing OhTwo hosts" rocon -F /tmp/$PROGNAME.conf -m OhTwoHosts echo "listing Z02 hosts" rocon -F /tmp/$PROGNAME.conf -m Z02Hosts echo "listing z02 hosts" rocon -F /tmp/$PROGNAME.conf -m z02Hosts echo "all done"