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 RESTOREFILE?=.restore
all: $(VARDIR)/${RESTOREFILE} all: $(VARDIR)/${RESTOREFILE}
$(VARDIR)/${RESTOREFILE}: $(SHAREDIR)/firewall $(VARDIR)/${RESTOREFILE}: $(VARDIR)/firewall
@/sbin/shorewall-lite -q save >/dev/null; \ @/sbin/shorewall-lite -q save >/dev/null; \
if \ if \
/sbin/shorewall-lite -q restart >/dev/null 2>&1; \ /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 # Check for /etc/shorewall-lite
# #
if [ -z "$PREFIX" && -d /etc/shorewall-lite ]; then if [ -z "$PREFIX" -a -d /etc/shorewall-lite ]; then
first_install="" first_install=""
backup_directory /etc/shorewall-lite backup_directory /etc/shorewall-lite
backup_directory /usr/share/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 installed on your administrative system(s) and Shorewall Lite RC4
on the firewall system(s). 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: New Features:
Shorewall Lite is a companion product to Shorewall and is designed to 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> cd <configuration directory>
/sbin/shorewall compile -e . firewall /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'. 3) On the firewall system, 'shorewall-lite start'.

View File

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

View File

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

View File

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

View File

@ -257,7 +257,7 @@ reload)
Causes the shorewall configuration in <directory> to be compiled into a Causes the shorewall configuration in <directory> to be compiled into a
program called '<directory>/firewall'. If compilation is successful, program called '<directory>/firewall'. If compilation is successful,
the '<directory>/firewall' script is copied via scp to the 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." 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 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 if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
run_install $OWNERSHIP -m 0744 shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf run_install $OWNERSHIP -m 0744 shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf
echo "Config file installed as ${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: The command is equivalent to:
/sbin/shorewall compile -e . firewall &&\ /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' ssh root@<system> '/sbin/shorewall-lite restart'
In other words, the configuration in the specified (or defaulted) In other words, the configuration in the specified (or defaulted)

View File

@ -1286,7 +1286,7 @@ restore_command() {
# #
reload_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 # Help information

View File

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

View File

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