2002-07-24 17:03:06 +02:00
|
|
|
#!/bin/sh
|
2002-05-01 01:13:15 +02:00
|
|
|
#
|
2006-01-16 16:15:43 +01:00
|
|
|
# Shorewall 3.2 -- /usr/share/shorewall/functions
|
2006-05-06 18:26:05 +02:00
|
|
|
#
|
|
|
|
# This program is under GPL [http://www.gnu.org/copyleft/gpl.htm]
|
|
|
|
#
|
|
|
|
# (c) 1999,2000,2001,2002,2003,2004,2005,2006 - Tom Eastep (teastep@shorewall.net)
|
|
|
|
#
|
|
|
|
# Complete documentation is available at http://shorewall.net
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of Version 2 of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
|
2005-07-09 07:45:05 +02:00
|
|
|
|
2006-06-27 01:10:34 +02:00
|
|
|
LIBVERSION=30192
|
2006-02-03 22:11:02 +01:00
|
|
|
|
2006-08-22 22:20:42 +02:00
|
|
|
#
|
|
|
|
# Load a run-time library
|
|
|
|
#
|
|
|
|
lib_load() # $1 = library name, $2=name of 'loaded' symbol, $3-n = Fatal Error Message
|
|
|
|
{
|
|
|
|
eval local loaded="\$${2}"
|
|
|
|
|
|
|
|
local lib=${SHAREDIR}/lib.${1}
|
|
|
|
|
|
|
|
if [ -z "$loaded" ]; then
|
|
|
|
if [ -x $lib ]; then
|
|
|
|
. $lib
|
|
|
|
else
|
|
|
|
shift 2
|
|
|
|
fatal_error "$@"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-06-09 18:35:55 +02:00
|
|
|
[ -n "${VARDIR:=/var/lib/shorewall}" ]
|
|
|
|
[ -n "${SHAREDIR:=/usr/share/shorewall}" ]
|
|
|
|
[ -n "${CONFDIR:=/etc/shorewall}" ]
|
|
|
|
|
2006-08-19 00:46:59 +02:00
|
|
|
SHOREWALL_LIBRARY=Loaded
|
2006-01-12 19:21:16 +01:00
|
|
|
|
2006-08-22 22:20:42 +02:00
|
|
|
lib_load base base LIB_BASE_LOADED "Installation Error: ${SHAREDIR}/lib.base not found"
|