1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $FreeBSD: head/etc/rc.d/natd 160671 2006-07-25 17:25:44Z yar $
| 3# $FreeBSD: head/etc/rc.d/natd 165683 2006-12-31 10:37:18Z yar $
|
4# 5 6# PROVIDE: natd 7# KEYWORD: nostart nojail 8 9. /etc/rc.subr 10. /etc/network.subr 11 12name="natd" 13rcvar=`set_rcvar` 14command="/sbin/${name}" 15pidfile="/var/run/${name}.pid" 16start_precmd="natd_precmd"
| 4# 5 6# PROVIDE: natd 7# KEYWORD: nostart nojail 8 9. /etc/rc.subr 10. /etc/network.subr 11 12name="natd" 13rcvar=`set_rcvar` 14command="/sbin/${name}" 15pidfile="/var/run/${name}.pid" 16start_precmd="natd_precmd"
|
| 17required_modules="ipdivert"
|
17 18natd_precmd() 19{
| 18 19natd_precmd() 20{
|
20 if ! ${SYSCTL} net.inet.divert > /dev/null 2>&1; then 21 if ! kldload ipdivert; then 22 warn unable to load IPDIVERT module. 23 return 1 24 fi 25 fi 26
| |
27 if [ -n "${natd_interface}" ]; then 28 dhcp_list="`list_net_interfaces dhcp`" 29 for ifn in ${dhcp_list}; do 30 case "${natd_interface}" in 31 ${ifn}) 32 rc_flags="$rc_flags -dynamic" 33 ;; 34 esac
--- 15 unchanged lines hidden --- | 21 if [ -n "${natd_interface}" ]; then 22 dhcp_list="`list_net_interfaces dhcp`" 23 for ifn in ${dhcp_list}; do 24 case "${natd_interface}" in 25 ${ifn}) 26 rc_flags="$rc_flags -dynamic" 27 ;; 28 esac
--- 15 unchanged lines hidden --- |