diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 2ad84917d..7b36f1044 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -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 diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 48f460380..dcf07591e 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -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}