anchor.diff:  #!/bin/bash
  -set -e
   ulimit -n 1024
   
   function mongocmd() 
  
positive.code: function add_replMember()
  {
  	member="$1"
  	if ! inreplset "$1"; then
  		debug "Adding $1 to the replica set..." 
  		block_until_isup "$member"
  		mongocmd "rs.add(\"$member\")"
  	else
  		debug "$1 is already in the replica set."
  	fi
  }
  
  
negative.code: 
  function block_until_isup()
  {
  	while ! isup "$1" >/dev/null 2>&1; do
  		debug "Waiting for $1 to come up..."
  		sleep 5
  	done
  }
  
  function inreplset()
  {
  	! mongocmd "rs.status()" | grep -q '"name" : "$1"'
  }
  
  function replSet_initted()
  {
  	! mongocmd "rs.status()" | grep "\"info\"" | grep -q "not yet done for the set"
  }
  
  function init_replSet()
  