1#!/bin/sh 2# 3 4# PROVIDE: vknetd 5# REQUIRE: DAEMON netif 6# BEFORE: LOGIN 7 8. /etc/rc.subr 9 10name="vknetd" 11rcvar=`set_rcvar` 12start_precmd="vknetd_precmd" 13command="/usr/sbin/${name}" 14pidfile="/var/run/${name}.pid" 15 16vknetd_precmd() 17{ 18 # load if_tap kernel module if needed 19 kldstat -m if_tap || kldload -n if_tap || exit 1 20} 21 22load_rc_config $name 23run_rc_command "$1" 24