diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/natd | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/rc.d/natd b/etc/rc.d/natd index 4bfdcfc..60e9e15 100644 --- a/etc/rc.d/natd +++ b/etc/rc.d/natd @@ -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`" |