mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 06:10:42 +01:00
Don't default IPSET to 'ipset'.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
860ee6de27
commit
5fcdfd779c
@ -525,7 +525,7 @@ show_routing() {
|
||||
determine_ipset_version() {
|
||||
local setname
|
||||
|
||||
if [ $IPSET = ipset ]; then
|
||||
if [ -z "$IPSET" -o $IPSET = ipset ]; then
|
||||
IPSET=$(mywhich ipset)
|
||||
[ -n "$IPSET" ] || fatal_error "The ipset utility cannot be located"
|
||||
fi
|
||||
@ -2956,27 +2956,6 @@ get_config() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$IPSET" ]; then
|
||||
case "$IPSET" in
|
||||
*/*)
|
||||
if [ ! -x "$IPSET" ] ; then
|
||||
echo " ERROR: The program specified in IPSET ($IPSET) does not exist or is not executable" >&2
|
||||
exit 2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
prog="$(mywhich $IPSET 2> /dev/null)"
|
||||
if [ -z "$prog" ] ; then
|
||||
echo " ERROR: Can't find $IPSET executable" >&2
|
||||
exit 2
|
||||
fi
|
||||
IPSET=$prog
|
||||
;;
|
||||
esac
|
||||
else
|
||||
IPSET='ipset'
|
||||
fi
|
||||
|
||||
[ -n "$RESTOREFILE" ] || RESTOREFILE=restore
|
||||
|
||||
validate_restorefile RESTOREFILE
|
||||
@ -3017,7 +2996,7 @@ get_config() {
|
||||
;;
|
||||
esac
|
||||
else
|
||||
IPSET='ipset'
|
||||
IPSET=''
|
||||
fi
|
||||
|
||||
TC=tc
|
||||
|
@ -84,7 +84,7 @@ get_script_version() { # $1 = script
|
||||
|
||||
temp=$( $SHOREWALL_SHELL $1 version | tail -n 1 | sed 's/-.*//' )
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ -z "$temp" ]; then
|
||||
version=0
|
||||
else
|
||||
ifs=$IFS
|
||||
|
@ -4564,6 +4564,8 @@ sub get_configuration( $$$ ) {
|
||||
default_yes_no 'AUTOHELPERS' , 'Yes';
|
||||
default_yes_no 'RESTORE_ROUTEMARKS' , 'Yes';
|
||||
|
||||
$config{IPSET} = '' if supplied $config{IPSET} && $config{IPSET} eq 'ipset';
|
||||
|
||||
if ( supplied $config{HELPERS} ) {
|
||||
my %helpers_temp = %helpers_enabled;
|
||||
|
||||
|
@ -136,6 +136,12 @@ get_config() {
|
||||
exit 2
|
||||
fi
|
||||
;;
|
||||
ipset)
|
||||
#
|
||||
# Old config files had this as default
|
||||
#
|
||||
IPSET=''
|
||||
;;
|
||||
*)
|
||||
prog="$(mywhich $IPSET 2> /dev/null)"
|
||||
if [ -z "$prog" ] ; then
|
||||
@ -146,7 +152,7 @@ get_config() {
|
||||
;;
|
||||
esac
|
||||
else
|
||||
IPSET='ipset'
|
||||
IPSET=''
|
||||
fi
|
||||
|
||||
if [ -n "$TC" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user