aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc/rc.d/ippool
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rc/rc.d/ippool')
-rwxr-xr-xlibexec/rc/rc.d/ippool40
1 files changed, 40 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/ippool b/libexec/rc/rc.d/ippool
new file mode 100755
index 000000000000..0db8bbe98f61
--- /dev/null
+++ b/libexec/rc/rc.d/ippool
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+#
+
+# PROVIDE: ippool
+# REQUIRE: FILESYSTEMS
+# BEFORE: ipfilter
+# KEYWORD: nojailvnet
+
+. /etc/rc.subr
+
+name="ippool"
+desc="user interface to the IPFilter pools"
+rcvar="ippool_enable"
+load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+ippool_svcj="NO"
+
+start_precmd="ippool_start_precmd"
+stop_cmd="${ippool_program} -F"
+reload_cmd="ippool_reload"
+extra_commands="reload"
+required_files="${ippool_rules}"
+required_modules="ipl:ipfilter"
+
+ippool_start_precmd()
+{
+ rc_flags="-f ${ippool_rules} ${rc_flags}"
+}
+
+ippool_reload()
+{
+ echo "Reloading IP Pools."
+ ${stop_cmd}
+ ${start_cmd}
+}
+
+
+run_rc_command "$1"