forked from extern/shorewall_code
Assume -c if capabilities file does not exist
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4820 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
084063e760
commit
88fac3769f
@ -68,6 +68,9 @@ Other Changes in 3.3.5.
|
||||
remote system to a file named "capabilities" in the export
|
||||
directory before compiling the configuration.
|
||||
|
||||
If the file "capabilities" does not currently exist in the
|
||||
export directory then "-c" is automatically assumed.
|
||||
|
||||
Migration Considerations:
|
||||
|
||||
1) Shorewall supports the notion of "default actions". A default
|
||||
|
@ -732,7 +732,7 @@ safe_commands() {
|
||||
#
|
||||
reload_command() # $* = original arguments less the command.
|
||||
{
|
||||
local verbose=$(make_verbose) file= finished=0 saveit= result directory system getcaps=
|
||||
local verbose=$(make_verbose) file= capabilities= finished=0 saveit= result directory system getcaps=
|
||||
|
||||
[ -n "$LITEDIR" ] || { echo " ERROR: LITEDIR not defined in ${SHAREDIR}/configpath" >&2; exit 2; }
|
||||
|
||||
@ -783,9 +783,9 @@ reload_command() # $* = original arguments less the command.
|
||||
;;
|
||||
esac
|
||||
|
||||
file=$(resolve_file $directory/firewall)
|
||||
capabilities=$(find_file capabilities)
|
||||
|
||||
if [ -n "$getcaps" ]; then
|
||||
if [ -n "$getcaps" -o ! -f $capabilities ]; then
|
||||
progress_message "Getting Capabilities on system $system..."
|
||||
if ! ssh root@${system} "/sbin/shorewall-lite show -f capabilities > ${LITEDIR}/capabilities" || \
|
||||
! scp root@$system:${LITEDIR}/capabilities $directory; then
|
||||
@ -793,6 +793,8 @@ reload_command() # $* = original arguments less the command.
|
||||
fi
|
||||
fi
|
||||
|
||||
file=$(resolve_file $directory/firewall)
|
||||
|
||||
if shorewall $debugging $verbose compile -e $directory $directory/firewall && \
|
||||
progress_message "Copying $file and ${file}.conf to ${system}:${LITEDIR}..." && \
|
||||
scp $directory/firewall $directory/firewall.conf root@${system}:${LITEDIR}
|
||||
|
Loading…
Reference in New Issue
Block a user