On 05/02/2012 10:24 AM, Fred Maillou wrote:
Hello,
The idea in using 'shorewall refresh' would be to re-apply an existing
TC configuration. In other words, 'shorewall restart' was already
executed (and included a TC config), and sometime later, a 'refresh'
would be done, using the same config files. The problem seems to be that
the 'refresh' command does nto seem to accept a directory for the config
files, like the 'restart' command does. Eg., given s set of config files
in /tmp/shorewall/ :
# shorewall restart /tmp/shorewall
Compiling...
[...]
Processing /etc/shorewall/started ...
done.
# shorewall refresh /tmp/shorewall
Compiling...
Loading Modules...
ERROR: The 'zones' file does not exist or has zero size
If you read the shorewall manpage, you will find:
shorewall [trace|debug [nolock]] [-options] refresh [chain...]
So arguments to the refresh command are expected to be either chain
names, table names (followed by ':'), or table-name:chain-name.
To be able to unambiguously supply a directory name, we need to extend
the syntax:
shorewall [trace|debug [nolock]] [-options] refresh [-D directory ]
[chain...]
Basic patch attached:
patch /usr/share/shorewall/lib.cli-std < REFRESH.patch
-Tom
--
Tom Eastep \ When I die, I want to go like my Grandfather who
Shoreline, \ died peacefully in his sleep. Not screaming like
Washington, USA \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std
index 2c34ac3..baf2861 100644
--- a/Shorewall/lib.cli-std
+++ b/Shorewall/lib.cli-std
@@ -972,6 +972,15 @@ refresh_command() {
finished=1
option=
;;
+ D)
+ if [ $# -gt 1 ]; then
+ g_shorewalldir="$2"
+ option=
+ shift
+ else
+ fatal_error "ERROR: the -D option requires a directory name"
+ fi
+ ;;
*)
usage 1
;;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users