diff options
author | Gordon Tetlow <gordon@FreeBSD.org> | 2002-09-06 16:18:05 +0000 |
---|---|---|
committer | Gordon Tetlow <gordon@FreeBSD.org> | 2002-09-06 16:18:05 +0000 |
commit | 77e55efba045df9367fc0d6e6bd9947eea91c543 (patch) | |
tree | 5bf37a1aebd8c46b4ce8523e594efce97ad8ee38 /etc/rc.d/ipfilter | |
parent | 550f8fc46b09679f939b32dc0d05c41b4cd57d4a (diff) | |
download | src-77e55efba045df9367fc0d6e6bd9947eea91c543.tar.gz src-77e55efba045df9367fc0d6e6bd9947eea91c543.zip |
Convert from `${CMD_OSTYPE}` to ${OSTYPE}. This saves a shell invocation on
OS-dependent case switches.
Notes
Notes:
svn path=/head/; revision=103019
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 2962551c159b..964668b093a9 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 |