#!/bin/sh . /etc/rc.conf netmonitor(){ while [ 1 ]; do ping -c 5 -t 1 $defaultrouter if [ $? -ne 0 ]; then sh /etc/netstart sh /etc/rc.virtual fi sleep 5 done } netmonitor &