Move the Shorewall Lite firewall script from /usr/share/shorewall-lite to /var/lib/shorewall-lite

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4116 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-06-16 14:59:41 +00:00
parent 33214aab85
commit 35453c86e3
12 changed files with 31 additions and 24 deletions

View File

@ -4,7 +4,7 @@ SHAREDIR=/usr/share/shorewall-lite
RESTOREFILE?=.restore
all: $(VARDIR)/${RESTOREFILE}
$(VARDIR)/${RESTOREFILE}: $(SHAREDIR)/firewall
$(VARDIR)/${RESTOREFILE}: $(VARDIR)/firewall
@/sbin/shorewall-lite -q save >/dev/null; \
if \
/sbin/shorewall-lite -q restart >/dev/null 2>&1; \

View File

@ -214,7 +214,7 @@ echo "Installing Shorewall Lite Version $VERSION"
#
# Check for /etc/shorewall-lite
#
if [ -z "$PREFIX" && -d /etc/shorewall-lite ]; then
if [ -z "$PREFIX" -a -d /etc/shorewall-lite ]; then
first_install=""
backup_directory /etc/shorewall-lite
backup_directory /usr/share/shorewall-lite

View File

@ -23,6 +23,13 @@ Other changes in 3.2.0 RC 4
installed on your administrative system(s) and Shorewall Lite RC4
on the firewall system(s).
2) To appease the LHS police, the file
/usr/share/shorewall-lite/firewall has been moved to
/var/lib/shorewall-lite/firewall. When upgrading to this release of
Shorewall Lite, please execute the following command:
cp -a /usr/share/shorewall-lite/firewall /var/lib/shorewall-lite/
New Features:
Shorewall Lite is a companion product to Shorewall and is designed to
@ -56,7 +63,7 @@ e) On the administrative system, for each firewall system you:
cd <configuration directory>
/sbin/shorewall compile -e . firewall
scp firewall root@<firewall system>:/usr/share/shorewall/
scp firewall root@<firewall system>:/var/lib/shorewall-lite/
3) On the firewall system, 'shorewall-lite start'.

View File

@ -462,10 +462,10 @@ start_command() {
do_it() {
[ -n "$nolock" ] || mutex_on
if [ -x ${SHAREDIR}/firewall ]; then
${SHAREDIR}/firewall $debugging start
if [ -x ${VARDIR}/firewall ]; then
${VARDIR}/firewall $debugging start
else
error_message "${CONFDIR}/firewall is missing or is not executable"
error_message "${VARDIR}/firewall is missing or is not executable"
fi
[ -n "$nolock" ] || mutex_off
@ -629,10 +629,10 @@ restart_command() {
[ -n "$nolock" ] || mutex_on
if [ -x ${SHAREDIR}/firewall ]; then
$SHOREWALL_SHELL ${SHAREDIR}/firewall $debugging restart
if [ -x ${VARDIR}/firewall ]; then
$SHOREWALL_SHELL ${VARDIR}/firewall $debugging restart
else
error_message "${SHAREDIR}/firewall is missing or is not executable"
error_message "${VARDIR}/firewall is missing or is not executable"
fi
[ -n "$nolock" ] || mutex_off
@ -1171,7 +1171,7 @@ VARDIR=/var/lib/shorewall-lite
CONFDIR=/etc/shorewall-lite
export PRODUCT="Shorewall Lite"
FIREWALL=$SHAREDIR/firewall
FIREWALL=$VARDIR/firewall
FUNCTIONS=$SHAREDIR/functions
VERSION_FILE=$SHAREDIR/version
HELP=$SHAREDIR/help

View File

@ -8661,8 +8661,6 @@ do_initialize() {
ensure_config_path
[ -n "$EXPORT" ] && CONFIG_PATH=$(echo $CONFIG_PATH | sed 's|^/etc/shorewall:|/usr/share/shorewall/configfiles:|')
VERSION_FILE=$SHAREDIR/version
[ -f $VERSION_FILE ] && VERSION=$(cat $VERSION_FILE)

View File

@ -248,7 +248,7 @@ find_file()
IFS=$saveifs
echo ${CONFDIR}/$1
[ -z "$EXPORT" ] && echo ${CONFDIR}/$1 || echo ${SHAREDIR}/configfiles/$1
fi
;;
esac

View File

@ -257,7 +257,7 @@ reload)
Causes the shorewall configuration in <directory> to be compiled into a
program called '<directory>/firewall'. If compilation is successful,
the '<directory>/firewall' script is copied via scp to the
/usr/share/shorewall-lite/ directory on <system>. If the script is copied
/var/lib/shorewall-lite/ directory on <system>. If the script is copied
successfully, Shorewall Lite on <system> is restarted via ssh."
;;

View File

@ -258,6 +258,8 @@ chmod 755 ${PREFIX}/usr/share/shorewall/configfiles
#
run_install $OWNERSHIP -m 0744 shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
qt mywhich perl && perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' /usr/share/shorewall/configfiles/shorewall.conf
if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
run_install $OWNERSHIP -m 0744 shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf
echo "Config file installed as ${PREFIX}/etc/shorewall/shorewall.conf"

View File

@ -59,7 +59,7 @@ Other changes in 3.2.0 RC 4
The command is equivalent to:
/sbin/shorewall compile -e . firewall &&\
scp firewall root@<system>:/usr/share/shorewall-lite/ &&\
scp firewall root@<system>:/var/lib/shorewall-lite/ &&\
ssh root@<system> '/sbin/shorewall-lite restart'
In other words, the configuration in the specified (or defaulted)

View File

@ -1286,7 +1286,7 @@ restore_command() {
#
reload_command()
{
shorewall compile -e $1 $1/firewall && scp $1/firewall root@${2}:/usr/share/shorewall-lite/ && ssh root@${2} '/sbin/shorewall-lite restart' && progress_message3 "System $1 reloaded"
shorewall compile -e $1 $1/firewall && scp $1/firewall root@${2}:/var/lib/shorewall-lite/ && ssh root@${2} '/sbin/shorewall-lite restart' && progress_message3 "System $1 reloaded"
}
#
# Help information

View File

@ -15,7 +15,7 @@
</author>
</authorgroup>
<pubdate>2006-06-14</pubdate>
<pubdate>2006-06-16</pubdate>
<copyright>
<year>2006</year>
@ -233,7 +233,7 @@
<listitem>
<programlisting><command>cd &lt;configuration directory&gt;</command>
<command>/sbin/shorewall compile -e . firewall</command>
<command>scp firewall root@&lt;firewall system&gt;:/usr/share/shorewall-lite/</command></programlisting>
<command>scp firewall root@&lt;firewall system&gt;:/var/lib/shorewall-lite/</command></programlisting>
</listitem>
</orderedlist>
</listitem>
@ -406,7 +406,7 @@
command</ulink> allows for easy updating of remote firewall systems by a
non-root user. At shorewall.net, I keep my firewall configurations in
sub-directories under ~/Configs. The name of the directory corresponds
to the DNS name of the system. </para>
to the DNS name of the system.</para>
<para>To recompile the firewall script for the system named gateway and
to install that script on gateway, I issue the following

View File

@ -15,7 +15,7 @@
</author>
</authorgroup>
<pubdate>2006-06-12</pubdate>
<pubdate>2006-06-16</pubdate>
<copyright>
<year>2004</year>
@ -162,7 +162,7 @@
</listitem>
<listitem>
<para><filename>/usr/share/shorewall-lite/firewall</filename> — The
<para><filename>/var/lib/shorewall-lite/firewall</filename> — The
firewall program. The program is generated using the
<command>shorewall compile -e</command> command on a system with the
full Shorewall product installed.</para>
@ -172,7 +172,7 @@
<para><filename>/usr/share/shorewall-lite/functions</filename> — A
library of Bourne Shell functions used by<filename>
/usr/share/shorewall-lite/shorewall</filename> and
<filename>/usr/share/shorewall-lite/firewall</filename>.</para>
<filename>/var/lib/shorewall-lite/firewall</filename>.</para>
</listitem>
</itemizedlist>
</section>
@ -952,7 +952,7 @@
&lt;system&gt;</command></para>
<para>If &lt;directory&gt; is omitted, the current working directory
is assumed. </para>
is assumed.</para>
<para>Allows a non-root user to compile a shorewall script and
install it on a system (provided that the user has root access to
@ -963,7 +963,7 @@
&lt;directory&gt;/firewall &amp;&amp;\</command></member>
<member><command>scp &lt;directory&gt;/firewall
root@&lt;system&gt;:/usr/share/shorewall-lite/
root@&lt;system&gt;:/var/lib/shorewall-lite/
&amp;&amp;\</command></member>
<member><command>ssh root@&lt;system&gt; '/sbin/shorewall-lite