mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
0c30639059
cases. So we get rid of quite a few lines of duplicated code.
31 lines
555 B
Bash
Executable File
31 lines
555 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: ipnat,v 1.6 2000/09/19 13:04:38 lukem Exp $
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: ipnat
|
|
# REQUIRE: ipfilter
|
|
# BEFORE: DAEMON netif
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="ipnat"
|
|
rcvar=`set_rcvar`
|
|
load_rc_config $name
|
|
start_cmd="ipnat_start"
|
|
stop_cmd="${ipnat_program} -F -C"
|
|
reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
|
|
extra_commands="reload"
|
|
required_files="${ipnat_rules}"
|
|
required_modules="ipl:ipfilter"
|
|
|
|
ipnat_start()
|
|
{
|
|
echo "Installing NAT rules."
|
|
${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
|
|
}
|
|
|
|
run_rc_command "$1"
|