summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/natd
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-12-31 10:37:18 +0000
committeryar <yar@FreeBSD.org>2006-12-31 10:37:18 +0000
commitdc9f8423c3772111565181a8568c60c4da0a1689 (patch)
tree7ed36d4fe8965c59b37bcccfa387cf77469cbeef /etc/rc.d/natd
parent58a4c67f05bc56e76c61ca19ed42f2e412cfd55f (diff)
downloadFreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.zip
FreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.tar.gz
Use $required_modules wherever suitable. Use load_kld() in special
cases. So we get rid of quite a few lines of duplicated code.
Diffstat (limited to 'etc/rc.d/natd')
-rw-r--r--etc/rc.d/natd8
1 files changed, 1 insertions, 7 deletions
diff --git a/etc/rc.d/natd b/etc/rc.d/natd
index a99df25..e22353a 100644
--- a/etc/rc.d/natd
+++ b/etc/rc.d/natd
@@ -14,16 +14,10 @@ rcvar=`set_rcvar`
command="/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_precmd="natd_precmd"
+required_modules="ipdivert"
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
-
if [ -n "${natd_interface}" ]; then
dhcp_list="`list_net_interfaces dhcp`"
for ifn in ${dhcp_list}; do
OpenPOWER on IntegriCloud