mirror of
https://github.com/firehol/firehol.git
synced 2024-06-30 19:02:21 +00:00
Detect and use TAR_CMD
A couple of other programs replaced Allow unconfigured programs to detect iprange in-situ
This commit is contained in:
parent
f7c3f430fd
commit
d2ec651cdc
@ -64,9 +64,6 @@ AC_SUBST(FIREHOL_CONFIG_DIR)
|
||||
|
||||
PATH=$PATH:/sbin:/usr/sbin
|
||||
|
||||
AX_CHECK_PROG([AGGREGATE], [aggregate], [])
|
||||
AX_CHECK_PROG([AGGREGATE], [aggregate-flim], [])
|
||||
AX_NEED_PROG([AGGREGATE], [cat], [])
|
||||
AX_NEED_PROG([BRCTL], [brctl], [])
|
||||
AX_NEED_PROG([CAT], [cat], [])
|
||||
AX_NEED_PROG([CHMOD], [chmod], [])
|
||||
@ -128,6 +125,7 @@ AX_NEED_PROG([SLEEP], [sleep], [])
|
||||
AX_NEED_PROG([SS], [ss], [])
|
||||
AX_NEED_PROG([SYSCTL], [sysctl], [])
|
||||
AX_NEED_PROG([TAIL], [tail], [])
|
||||
AX_NEED_PROG([TAR], [tar], [])
|
||||
AX_NEED_PROG([TOUCH], [touch], [])
|
||||
AX_NEED_PROG([TR], [tr], [])
|
||||
AX_NEED_PROG([UNAME], [uname], [])
|
||||
|
@ -85,7 +85,7 @@ fi
|
||||
#cat $MYTMP/files.lst
|
||||
|
||||
dirname="${0%/*}"
|
||||
if [ "$dir" = "$0" ]; then dir="."; fi
|
||||
if [ "$dirname" = "$0" ]; then dirname="."; fi
|
||||
source $dirname/check-files.functions
|
||||
|
||||
status=0
|
||||
|
@ -979,7 +979,9 @@ do
|
||||
then
|
||||
eval $cmd_var=\"$autoconf\"
|
||||
else
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" which_all $cmd_var "$possibles"
|
||||
dirname="${0%/*}"
|
||||
if [ "$dirname" = "$0" ]; then dirname="."; fi
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH:$dirname" which_all $cmd_var "$possibles"
|
||||
fi
|
||||
if [ "$required" = "Y" ]
|
||||
then
|
||||
|
@ -253,7 +253,9 @@ do
|
||||
then
|
||||
eval $cmd_var=\"$autoconf\"
|
||||
else
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" which_all $cmd_var "$possibles"
|
||||
dirname="${0%/*}"
|
||||
if [ "$dirname" = "$0" ]; then dirname="."; fi
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH:$dirname" which_all $cmd_var "$possibles"
|
||||
fi
|
||||
if [ "$required" = "Y" ]
|
||||
then
|
||||
|
@ -276,7 +276,9 @@ do
|
||||
then
|
||||
eval $cmd_var=\"$autoconf\"
|
||||
else
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" which_all $cmd_var "$possibles"
|
||||
dirname="${0%/*}"
|
||||
if [ "$dirname" = "$0" ]; then dirname="."; fi
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH:$dirname" which_all $cmd_var "$possibles"
|
||||
fi
|
||||
if [ "$required" = "Y" ]
|
||||
then
|
||||
@ -315,7 +317,7 @@ N|HEAD_CMD|@HEAD@|head
|
||||
N|TPUT_CMD|@TPUT@|tput
|
||||
N|WGET_CMD|@WGET@|wget
|
||||
N|SCREEN_CMD|@SCREEN@|screen
|
||||
Y|AGGREGATE_CMD|@AGGREGATE@|aggregate aggregate-flim cat
|
||||
Y|IPRANGE_CMD|@IPRANGE@|iprange
|
||||
!
|
||||
|
||||
VERSION=$(get_version)
|
||||
@ -1854,7 +1856,7 @@ asips() {
|
||||
$JQ_CMD .data.prefixes[].prefix |\
|
||||
$SED_CMD -e 's| ||g' -e 's|"||g' |\
|
||||
$EGREP_CMD "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+" |\
|
||||
$AGGREGATE_CMD
|
||||
$IPRANGE_CMD
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -251,7 +251,9 @@ do
|
||||
then
|
||||
eval $cmd_var=\"$autoconf\"
|
||||
else
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" which_all $cmd_var "$possibles"
|
||||
dirname="${0%/*}"
|
||||
if [ "$dirname" = "$0" ]; then dirname="."; fi
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH:$dirname" which_all $cmd_var "$possibles"
|
||||
fi
|
||||
if [ "$required" = "Y" ]
|
||||
then
|
||||
@ -292,6 +294,7 @@ Y|FIND_CMD|@FIND@|find
|
||||
Y|WC_CMD|@WC@|wc
|
||||
Y|MV_CMD|@MV@|mv
|
||||
Y|CP_CMD|@CP@|cp
|
||||
Y|TAR_CMD|@TAR@|tar
|
||||
Y|IPSET_CMD|@IPSET@|ipset
|
||||
N|UNZIP_CMD|@UNZIP@|unzip
|
||||
N|FUNZIP_CMD|@FUNZIP@|funzip
|
||||
@ -675,7 +678,7 @@ options are:
|
||||
Will only process the given ipsets.
|
||||
This parameter must be the last in command line, it
|
||||
assumes all parameters after the keyword 'run' are
|
||||
ipset names.
|
||||
ipsets names.
|
||||
|
||||
EOFUSAGE
|
||||
}
|
||||
@ -960,7 +963,7 @@ git_checkout_or_add() {
|
||||
git_ignore_file() {
|
||||
local file="${1}"
|
||||
|
||||
local found=$(cat "${BASE_DIR}/.gitignore" | grep "^${file}$$")
|
||||
local found=$($CAT_CMD "${BASE_DIR}/.gitignore" | $GREP_CMD "^${file}$$")
|
||||
if [ -z "${found}" ]
|
||||
then
|
||||
echo "${file}" >>"${BASE_DIR}/.gitignore" || return 1
|
||||
@ -3662,9 +3665,8 @@ ipdeny_country() {
|
||||
$MKDIR_CMD "${BASE_DIR}/${ipset}" || return 1
|
||||
fi
|
||||
|
||||
# FIXME - tar to TAR_CMD
|
||||
# extract it
|
||||
tar -zxpf "${BASE_DIR}/${ipset}.source"
|
||||
$TAR_CMD -zxpf "${BASE_DIR}/${ipset}.source"
|
||||
|
||||
# move them inside the tmp, and fix continents
|
||||
local x=
|
||||
@ -6468,7 +6470,7 @@ do
|
||||
fi
|
||||
|
||||
verbose "Loading ipset definitions from: '${supplied_ipsets_dir}'"
|
||||
for supplied_ipset_file in $(ls "${supplied_ipsets_dir}"/*.conf 2>/dev/null)
|
||||
for supplied_ipset_file in $($LS_CMD "${supplied_ipsets_dir}"/*.conf 2>/dev/null)
|
||||
do
|
||||
verbose "Loading ipset definition file: '${supplied_ipset_file}'"
|
||||
|
||||
|
@ -200,7 +200,9 @@ do
|
||||
then
|
||||
eval $cmd_var=\"$autoconf\"
|
||||
else
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" which_all $cmd_var "$possibles"
|
||||
dirname="${0%/*}"
|
||||
if [ "$dirname" = "$0" ]; then dirname="."; fi
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH:$dirname" which_all $cmd_var "$possibles"
|
||||
fi
|
||||
if [ "$required" = "Y" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user