From 5c9db195e9e6b1cc27651f75ad619fa6cf1af12a Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 11 Apr 2005 22:12:46 +0000 Subject: [PATCH] Add OPTIONS for startup git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2049 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/changelog.txt | 3 +++ Shorewall2/init.sh | 12 +++++++++++- Shorewall2/releasenotes.txt | 11 +++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Shorewall2/changelog.txt b/Shorewall2/changelog.txt index d9a9d025f..bc0da1b72 100644 --- a/Shorewall2/changelog.txt +++ b/Shorewall2/changelog.txt @@ -10,6 +10,9 @@ Changes in 2.2.4 5) Add Paul Traina's patch to install.sh. +6) Allow startup options to be overridden in /etc/sysconfig/shorewall + or /etc/default/shorewall. + Changes in 2.2.3 1) Added the 'continue' extension script. diff --git a/Shorewall2/init.sh b/Shorewall2/init.sh index ba66bcfa3..2a7dd230d 100644 --- a/Shorewall2/init.sh +++ b/Shorewall2/init.sh @@ -55,6 +55,16 @@ usage() { exit 1 } +################################################################################ +# Get startup options (override default) +################################################################################ +OPTIONS="-f" +if [ -f /etc/sysconfig/shorewall ]; then + . /etc/sysconfig/shorewall +elif [ -f /etc/default/shorewall ] ; then + . /etc/default/shorewall +fi + ################################################################################ # E X E C U T I O N B E G I N S H E R E # ################################################################################ @@ -64,7 +74,7 @@ case "$command" in start) - exec /sbin/shorewall -f start + exec /sbin/shorewall $OPTIONS start ;; stop|restart|status) diff --git a/Shorewall2/releasenotes.txt b/Shorewall2/releasenotes.txt index c564b5feb..c54607f5b 100755 --- a/Shorewall2/releasenotes.txt +++ b/Shorewall2/releasenotes.txt @@ -87,6 +87,17 @@ New Features in version 2.2.4 directly but may do so indirectly by running /sbin/shorewall with the 'nolock' option. +3) By default, shorewall is started with the "-f" (fast) option when + your system boots. You can override that setting by setting the + OPTIONS variable in /etc/sysconfig/shorewall (SuSE/Redhat) or + /etc/default/shorewall (Debian/Bering). If neither file exists, feel + free to create one. + + Example: If you want Shorewall to always use the config files even + if there is a saved configuration, then specify: + + OPTIONS="" + ----------------------------------------------------------------------- Problems corrected in version 2.2.3