From 2181d84dde21ccb7991b207206043d2654f5943d Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 17 May 2007 14:42:25 +0000 Subject: [PATCH] Fix documentation and 'try' command git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6385 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/releasenotes.txt | 6 +++++- Shorewall-common/shorewall | 8 +++++++- docs/starting_and_stopping_shorewall.xml | 6 +++++- manpages/shorewall.xml | 8 +++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index e24642984..1d2559beb 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -210,7 +210,11 @@ Migration Considerations: '' , #Log tag 'add'; - f) The 'refresh' command is now synonymous with 'restart'. + f) The 'refresh' command is now works like 'restart' with the + following exceptions: + + - The refresh command is rejected if Shorewall is not running. + - A directory name may not be specified in the refresh command. g) Some run-time scripts will need to be changed to write their iptables commands to file descriptor 3 in iptables-restore diff --git a/Shorewall-common/shorewall b/Shorewall-common/shorewall index 73c7a2e0c..50aea7684 100755 --- a/Shorewall-common/shorewall +++ b/Shorewall-common/shorewall @@ -405,7 +405,7 @@ start_command() { 0) ;; 1) - [ -n "$SHOREWALL_DIR" -o -n "$FAST" ] && usage 2 + [ -n "$SHOREWALL_DIR" ] && usage 2 if [ ! -d $1 ]; then if [ -e $1 ]; then @@ -983,6 +983,12 @@ try_command() { 2) handle_directory $1 timeout=$2 + case $timeout in + *[!0-9]*) + echo " ERROR: Invalid timeout ($timeout)" >&2; + exit 1 + ;; + esac ;; *) usage 1 diff --git a/docs/starting_and_stopping_shorewall.xml b/docs/starting_and_stopping_shorewall.xml index b715af13d..1fad2fa70 100644 --- a/docs/starting_and_stopping_shorewall.xml +++ b/docs/starting_and_stopping_shorewall.xml @@ -1319,7 +1319,11 @@ gateway:~ # specified, the saved configuration specified by the RESTOREFILE option in /etc/shorewall/shorewall.conf - will be restored if that saved configuration exists + will be restored if that saved configuration exists. When -f is given, a + <configuration-directory> may not + be specified. The -f option is not + available with shorewall-lite. diff --git a/manpages/shorewall.xml b/manpages/shorewall.xml index 90c654558..c60308585 100644 --- a/manpages/shorewall.xml +++ b/manpages/shorewall.xml @@ -1117,13 +1117,15 @@ Start shorewall. Existing connections through shorewall managed interfaces are untouched. New connections will be allowed only if they are allowed by the firewall rules or policies. If a - directory is included in the command, Shorewall - will look in that directory first for + directory is included in the command, + Shorewall will look in that directory first for configuration files.If -f is specified, the saved configuration specified by the RESTOREFILE option in shorewall.conf(5) will be restored if that saved configuration exists and has been - modified more recently than the files in /etc/shorewall. + modified more recently than the files in /etc/shorewall. When + -f is given, a + directory may not be specified. The option determines the compiler to use (Shorewall-shell or Shorewall-perl). If not specified, the