Automatically load the ipdivert module if it was not compiled into the kernel
and natd_enable is true.
This commit is contained in:
parent
21dcc96f4a
commit
e3d53beb77
@ -12,8 +12,21 @@
|
||||
name="natd"
|
||||
rcvar=`set_rcvar`
|
||||
command="/sbin/${name}"
|
||||
start_precmd="natd_precmd"
|
||||
start_cmd="natd_start"
|
||||
|
||||
natd_precmd()
|
||||
{
|
||||
if ! ${SYSCTL} net.inet.divert > /dev/null 2>&1; then
|
||||
if ! kldload ipdivert; then
|
||||
warn unable to load IPDIVERT module.
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
natd_start()
|
||||
{
|
||||
dhcp_list="`list_net_interfaces dhcp`"
|
||||
|
Loading…
x
Reference in New Issue
Block a user