summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/ipmon
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-04-24 08:20:47 +0000
committermtm <mtm@FreeBSD.org>2003-04-24 08:20:47 +0000
commita6c5ee3cc4da9ead0959ff4821507c2229de063f (patch)
treec0744a674488d76a59082db26fc4805a539f9646 /etc/rc.d/ipmon
parent2b308e25a03938ef728237c7cc2d42d7bdac5f43 (diff)
downloadFreeBSD-src-a6c5ee3cc4da9ead0959ff4821507c2229de063f.zip
FreeBSD-src-a6c5ee3cc4da9ead0959ff4821507c2229de063f.tar.gz
Make ipfilter, ipnat, ipmon, and ipfs behave more like the old rc.
o group them together so they run one right after another o use the NetBSD supplied ipfs script instead of tacking it on to the end of ipnat o Load the ipl module in ipnat and ipfilter, if it's not already loaded o In ipmon and ipnat show a warning if neither ipfilter nor ipnat is enabled or the ipl module is not loaded, and exit Approved by: markm (mentor) (implicit) Tested by: leafy <leafy@leafy.idv.tw>
Diffstat (limited to 'etc/rc.d/ipmon')
-rwxr-xr-xetc/rc.d/ipmon11
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/rc.d/ipmon b/etc/rc.d/ipmon
index 12ef6cc..0c2c1cc 100755
--- a/etc/rc.d/ipmon
+++ b/etc/rc.d/ipmon
@@ -5,7 +5,7 @@
#
# PROVIDE: ipmon
-# REQUIRE: syslogd
+# REQUIRE: mountcritlocal hostname sysctl
# BEFORE: SERVERS
# KEYWORD: FreeBSD NetBSD
@@ -26,9 +26,14 @@ esac
ipmon_precmd()
{
- # Make sure ipfilter is loaded before continuing
+ # Continue only if ipfilter or ipnat is enabled and the
+ # ipfilter module is loaded.
+ #
+ if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
+ err 1 "${name} requires either ipfilter or ipnat enabled"
+ fi
if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
- return 1
+ err 1 "ipfilter module is not loaded"
fi
return 0
}
OpenPOWER on IntegriCloud