#!/usr/pkg/bin/bash
if [ -z "$2" ]; then
 echo Usage: $0 TARGET COMMAND >&2
 exit 0
fi
while ! ping -n 1 $1 >/dev/null; do
 sleep 5;
done
shift
$@
