diff options
author | gordon <gordon@FreeBSD.org> | 2002-09-06 16:18:05 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2002-09-06 16:18:05 +0000 |
commit | a7f04bb2b79fce3619508825b96c5564b044a9cf (patch) | |
tree | 5bf37a1aebd8c46b4ce8523e594efce97ad8ee38 /etc/rc.d/ipfilter | |
parent | 390d72be15b0b886ecec8a4ce9879fadaa97f9a9 (diff) | |
download | FreeBSD-src-a7f04bb2b79fce3619508825b96c5564b044a9cf.zip FreeBSD-src-a7f04bb2b79fce3619508825b96c5564b044a9cf.tar.gz |
Convert from `${CMD_OSTYPE}` to ${OSTYPE}. This saves a shell invocation on
OS-dependent case switches.
Diffstat (limited to 'etc/rc.d/ipfilter')
-rwxr-xr-x | etc/rc.d/ipfilter | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/rc.d/ipfilter b/etc/rc.d/ipfilter index 2962551..964668b 100755 --- a/etc/rc.d/ipfilter +++ b/etc/rc.d/ipfilter @@ -14,7 +14,7 @@ name="ipfilter" rcvar=`set_rcvar` load_rc_config $name -case `${CMD_OSTYPE}` in +case ${OSTYPE} in FreeBSD) stop_precmd="test -f ${ipfilter_rules}" ;; @@ -36,7 +36,7 @@ extra_commands="reload resync status" ipfilter_prestart() { -case `${CMD_OSTYPE}` in +case ${OSTYPE} in FreeBSD) # load ipfilter kernel module if needed if ! sysctl net.inet.ipf.fr_pass > /dev/null 2>&1; then @@ -76,7 +76,7 @@ esac ipfilter_start() { echo "Enabling ipfilter." - case `${CMD_OSTYPE}` in + case ${OSTYPE} in FreeBSD) ${ipfilter_program:-/sbin/ipf} -Fa -f \ "${ipfilter_rules}" ${ipfilter_flags} @@ -95,7 +95,7 @@ ipfilter_start() ipfilter_stop() { - case `${CMD_OSTYPE}` in + case ${OSTYPE} in FreeBSD) echo "Saving firewall state tables" ${ipfs_program:-/sbin/ipfs} -W ${ipfs_flags} @@ -112,7 +112,7 @@ ipfilter_reload() { echo "Reloading ipfilter rules." - case `${CMD_OSTYPE}` in + case ${OSTYPE} in FreeBSD) ${ipfilter_program:-/sbin/ipf} -I -Fa -f \ "${ipfilter_rules}" ${ipfilter_flags} @@ -136,7 +136,7 @@ ipfilter_reload() ipfilter_resync() { - case `${CMD_OSTYPE}` in + case ${OSTYPE} in FreeBSD) # Don't resync if ipfilter is not loaded [ sysctl net.inet.ipf.fr_pass > /dev/null 2>&1 ] && return |