ipfilter revision 381a2a9a387f449fab7d0c7e97c4184c26963abf
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# ident "%Z%%M% %I% %E% SMI"
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
if [ -f $PIDFILE ] ; then
else
fi
logmsg()
{
logger -p daemon.warning -t ipfilter "$1"
echo "$1" >&2
}
bad=0
if [ -r ${IPFILCONF} ]; then
if [ $? != 0 ]; then
echo "$0: load of ${IPFILCONF} into alternate set failed"
bad=1
fi
fi
if [ -r ${IP6FILCONF} ]; then
ipf -6IFa -f ${IP6FILCONF} >/dev/null
if [ $? != 0 ]; then
echo "$0: load of ${IPFILCONF} into alternate set failed"
bad=1
fi
fi
return 0
else
echo "Not switching config due to load error."
return 1
fi
}
if [ -r ${IPNATCONF} ]; then
if [ $? != 0 ]; then
echo "$0: load of ${IPNATCONF} failed"
return 1
else
return 0
fi
else
return 0
fi
}
if [ -r ${IPPOOLCONF} ]; then
ippool -f ${IPPOOLCONF} >/dev/null
if [ $? != 0 ]; then
echo "$0: load of ${IPPOOLCONF} failed"
return 1
else
return 0
fi
else
return 0
fi
}
case "$1" in
[ ! -f ${IPFILCONF} ] && exit 0
else
exit $SMF_EXIT_ERR_CONFIG
fi
;;
stop)
;;
ipfs -l
ipf -D
if [ -f $PIDFILE ] ; then
if kill -0 $pid; then
else
fi
fi
;;
ipf -E
ipfs -R
fi
;;
;;
;;
;;
*)
echo "Usage: $0 \c" >&2
echo "(start|stop|reload|reipf|reipnat|pause|resume)" >&2
exit 1
;;
esac
exit $SMF_EXIT_OK