Make the CLI used dependent on the product installed.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2014-02-11 09:04:18 -08:00
parent 16b80c3e45
commit 2e9342aef0

View File

@ -2216,9 +2216,11 @@ AVG_RTT=${13}
if [ -f /usr/share/shorewall-lite/lib.base ]; then
VARDIR=/var/lib/shorewall-lite
STATEDIR=/etc/shorewall-lite
TOOL=/sbin/shorewall-lite
else
VARDIR=/var/lib/shorewall
STATEDIR=/etc/shorewall
TOOL=/sbin/shorewall
fi
[ -f ${STATEDIR}/vardir ] &amp;&amp; . ${STATEDIR}/vardir
@ -2255,9 +2257,9 @@ EOM
# [ ${STATE} = up ] &amp;&amp; state=0 || state=1
# echo $state &gt; ${VARDIR}/${DEVICE}.status
/sbin/shorewall restart -f &gt;&gt; /var/log/lsm 2&gt;&amp;1
$TOOL restart -f &gt;&gt; /var/log/lsm 2&gt;&amp;1
/sbin/shorewall show routing &gt;&gt; /var/log/lsm
$TOOL show routing &gt;&gt; /var/log/lsm
exit 0
@ -2289,9 +2291,11 @@ AVG_RTT=${13}
if [ -f /usr/share/shorewall-lite/lib.base ]; then
VARDIR=/var/lib/shorewall-lite
STATEDIR=/etc/shorewall-lite
TOOL=/sbin/shorewall-lite
else
VARDIR=/var/lib/shorewall
STATEDIR=/etc/shorewall
TOOL=/sbin/shorewall
fi
[ -f ${STATEDIR}/vardir ] &amp;&amp; . ${STATEDIR}/vardir
@ -2331,7 +2335,7 @@ else
${VARDIR}/firewall disable ${DEVICE}
fi
</emphasis>
/sbin/shorewall show routing &gt;&gt; /var/log/lsm
$TOOL show routing &gt;&gt; /var/log/lsm
exit 0