mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Merge branch '4.5.13'
This commit is contained in:
commit
0afcf3c40c
@ -1409,11 +1409,11 @@ reload_command() # $* = original arguments less the command.
|
|||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
1)
|
1)
|
||||||
g_directory="."
|
g_shorewalldir="."
|
||||||
system=$1
|
system=$1
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
g_directory=$1
|
g_shorewalldir=$1
|
||||||
system=$2
|
system=$2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -1421,30 +1421,30 @@ reload_command() # $* = original arguments less the command.
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -f $g_directory/shorewallrc ]; then
|
if [ -f $g_shorewalldir/shorewallrc ]; then
|
||||||
. $g_directory/shorewallrc
|
. $g_shorewalldir/shorewallrc
|
||||||
sbindir="$SBINDIR"
|
sbindir="$SBINDIR"
|
||||||
confdir="$CONFDIR"
|
confdir="$CONFDIR"
|
||||||
libexec="$LIBEXECDIR"
|
libexec="$LIBEXECDIR"
|
||||||
. $sharedir/shorewall/shorewallrc
|
. $sharedir/shorewall/shorewallrc
|
||||||
else
|
else
|
||||||
error_message " WARNING: $g_directory/shorewallrc does not exist; using settings from $SHAREDIR/shorewall" >&2
|
error_message " WARNING: $g_shorewalldir/shorewallrc does not exist; using settings from $SHAREDIR/shorewall" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$getcaps" ]; then
|
if [ -z "$getcaps" ]; then
|
||||||
[ -f $g_directory/capabilities ] || getcaps=Yes
|
[ -f $g_shorewalldir/capabilities ] || getcaps=Yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $g_directory/${g_program}.conf ]; then
|
if [ -f $g_shorewalldir/${g_program}.conf ]; then
|
||||||
if [ -f $g_directory/params ]; then
|
if [ -f $g_shorewalldir/params ]; then
|
||||||
. $g_directory/params
|
. $g_shorewalldir/params
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. $g_directory/$g_program.conf
|
. $g_shorewalldir/$g_program.conf
|
||||||
|
|
||||||
ensure_config_path
|
ensure_config_path
|
||||||
else
|
else
|
||||||
fatal_error "$g_directory/$g_program.conf does not exist"
|
fatal_error "$g_shorewalldir/$g_program.conf does not exist"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$getcaps" ]; then
|
if [ -n "$getcaps" ]; then
|
||||||
@ -1452,21 +1452,21 @@ reload_command() # $* = original arguments less the command.
|
|||||||
|
|
||||||
progress_message "Getting Capabilities on system $system..."
|
progress_message "Getting Capabilities on system $system..."
|
||||||
if [ $g_family -eq 4 ]; then
|
if [ $g_family -eq 4 ]; then
|
||||||
if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IPTABLES=$IPTABLES DONT_LOAD=\"$DONT_LOAD\" $libexec/shorewall-lite/shorecap" > $g_directory/capabilities; then
|
if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IPTABLES=$IPTABLES DONT_LOAD=\"$DONT_LOAD\" $libexec/shorewall-lite/shorecap" > $g_shorewalldir/capabilities; then
|
||||||
fatal_error "Capturing capabilities on system $system failed"
|
fatal_error "Capturing capabilities on system $system failed"
|
||||||
fi
|
fi
|
||||||
elif ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IP6TABLES=$IP6TABLES DONT_LOAD=\"$DONT_LOAD\" $libexec/shorewall6-lite/shorecap" > $g_directory/capabilities; then
|
elif ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IP6TABLES=$IP6TABLES DONT_LOAD=\"$DONT_LOAD\" $libexec/shorewall6-lite/shorecap" > $g_shorewalldir/capabilities; then
|
||||||
fatal_error "Capturing capabilities on system $system failed"
|
fatal_error "Capturing capabilities on system $system failed"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
file=$(resolve_file $g_directory/firewall)
|
file=$(resolve_file $g_shorewalldir/firewall)
|
||||||
|
|
||||||
[ -n "$g_timestamp" ] && timestamp='-t' || timestamp=
|
[ -n "$g_timestamp" ] && timestamp='-t' || timestamp=
|
||||||
|
|
||||||
if $g_program $g_debugging $verbose $timestamp compile -e $g_directory $g_directory/firewall && \
|
if $g_program $g_debugging $verbose $timestamp compile -e $g_shorewalldir $g_shorewalldir/firewall && \
|
||||||
progress_message3 "Copying $file and ${file}.conf to ${system}:${litedir}..." && \
|
progress_message3 "Copying $file and ${file}.conf to ${system}:${litedir}..." && \
|
||||||
rcp_command "$g_directory/firewall $g_directory/firewall.conf" ${litedir}
|
rcp_command "$g_shorewalldir/firewall $g_shorewalldir/firewall.conf" ${litedir}
|
||||||
then
|
then
|
||||||
save=$(find_file save);
|
save=$(find_file save);
|
||||||
|
|
||||||
@ -1529,11 +1529,11 @@ export_command() # $* = original arguments less the command.
|
|||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
1)
|
1)
|
||||||
g_directory="."
|
g_shorewalldir="."
|
||||||
target=$1
|
target=$1
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
g_directory=$1
|
g_shorewalldir=$1
|
||||||
target=$2
|
target=$2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -1549,11 +1549,11 @@ export_command() # $* = original arguments less the command.
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
file=$(resolve_file $g_directory/firewall)
|
file=$(resolve_file $g_shorewalldir/firewall)
|
||||||
|
|
||||||
if $g_program $g_debugging $verbose compile -e $g_directory $g_directory/firewall && \
|
if $g_program $g_debugging $verbose compile -e $g_shorewalldir $g_shorewalldir/firewall && \
|
||||||
echo "Copying $file and ${file}.conf to ${target#*@}..." && \
|
echo "Copying $file and ${file}.conf to ${target#*@}..." && \
|
||||||
scp $g_directory/firewall $g_directory/firewall.conf $target
|
scp $g_shorewalldir/firewall $g_shorewalldir/firewall.conf $target
|
||||||
then
|
then
|
||||||
save=$(find_file save);
|
save=$(find_file save);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user