"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "share/arno-iptables-firewall/aif-job-processor" between
aif-2.1.0.tar.gz and aif-2.1.1.tar.gz

About: Arno’s iptables firewall is a stateful firewall script for both single and multi-homed machines with DSL/ADSL support.

aif-job-processor  (aif-2.1.0):aif-job-processor  (aif-2.1.1)
#!/bin/sh #!/bin/sh
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# -= Arno's Iptables Firewall(AIF) =- # -= Arno's Iptables Firewall(AIF) =-
# Single- & multi-homed firewall script with DSL/ADSL support # Single- & multi-homed firewall script with DSL/ADSL support
# #
# ~ In memory of my dear father ~ # ~ In memory of my dear father ~
# #
# (C) Copyright 2001-2019 by Arno van Amersfoort & Lonnie Abelbeck # (C) Copyright 2001-2020 by Arno van Amersfoort & Lonnie Abelbeck
# Homepage : https://rocky.eld.leidenuniv.nl/ # Homepage : https://rocky.eld.leidenuniv.nl/
# Email : a r n o v a AT r o c k y DOT e l d DOT l e i d e n u n i v DOT n l # Email : a r n o v a AT r o c k y DOT e l d DOT l e i d e n u n i v DOT n l
# (note: you must remove all spaces and substitute the @ and the . # (note: you must remove all spaces and substitute the @ and the .
# at the proper locations!) # at the proper locations!)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation. # version 2 as published by the Free Software Foundation.
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 120 skipping to change at line 120
result="$("$JOB_EXECUTER" "$SCRIPT_PATH" 2>&1 1>&3)" result="$("$JOB_EXECUTER" "$SCRIPT_PATH" 2>&1 1>&3)"
retval=$? retval=$?
# Release extra FD # Release extra FD
exec 3>&- exec 3>&-
# In case an error occurred, log it # In case an error occurred, log it
if [ $retval -ne 0 ]; then if [ $retval -ne 0 ]; then
echo "$result (error=$retval)" >&2 echo "$result (error=$retval)" >&2
echo "$result (error=$retval)" |log_msg "${SCRIPT_NAME}: " echo "$result (error=$retval)" |log_msg "${SCRIPT_NAME}: "
elif [ -n "$result" -a $VERBOSE -eq 1 ]; then
echo "$result"
fi fi
# Reset counter # Reset counter
SCRIPT_CUR_TIME=0 SCRIPT_CUR_TIME=0
fi fi
# As soon as the jobs file gets removed, stop processing (and terminate) # As soon as the jobs file gets removed, stop processing (and terminate)
if [ ! -f "$JOBS_FILE" ]; then if [ ! -f "$JOBS_FILE" ]; then
# Leave critical section: # Leave critical section:
lock_leave "$JOBS_LOCK_NAME" lock_leave "$JOBS_LOCK_NAME"
skipping to change at line 203 skipping to change at line 205
shift # Next argument shift # Next argument
done done
} }
############ ############
# Mainline # # Mainline #
############ ############
process_commandline $* process_commandline $*
if [ -z "$CONF_FILE" -o ! -e "$CONF_FILE" ]; then if [ ! -f "$CONF_FILE" ]; then
echo "ERROR: Could not read configuration file ($CONF_FILE)!" >&2 echo "ERROR: Could not read configuration file ($CONF_FILE)!" >&2
echo "" >&2 echo "" >&2
exit 1 exit 1
fi fi
# Source config file # Source config file
. "$CONF_FILE" . "$CONF_FILE"
# Check if the environment file exists and if so, load it # Check if the environment file exists and if so, load it
######################################################### #########################################################
if [ -n "$ENV_FILE" ]; then ENV_FILE="${0%/*}/environment"
. "$ENV_FILE"
else if [ ! -f "$ENV_FILE" ]; then
if [ -f /usr/local/share/arno-iptables-firewall/environment ]; then echo "** ERROR: Unable to locate environment file \"$ENV_FILE\"!" >&2
. /usr/local/share/arno-iptables-firewall/environment exit 2
else
if [ -f /usr/share/arno-iptables-firewall/environment ]; then
. /usr/share/arno-iptables-firewall/environment
else
echo "** ERROR: The environment file (ENV_FILE) has not been specified" >&
2
echo "** in the configuration file. Try upgrading your config-file!
" >&2
exit 2
fi
fi
fi fi
# Source environment file
. "$ENV_FILE"
# Only proceed if environment ok # Only proceed if environment ok
if sanity_check; then if sanity_check; then
job_process job_process
fi fi
 End of changes. 5 change blocks. 
19 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)