#!/bin/sh -e proto=$1 srv=$2 shift shift drill -${proto} @$srv $@ >state/drill-out grep -q "rcode: NOERROR" state/drill-out || { cat state/drill-out exit 1 }