mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
Hack out SHOREWALL_DIR from /sbin/shorewall-lite
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6400 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
e1b85e8d51
commit
8f8d692d4a
@ -235,20 +235,6 @@ start_command() {
|
|||||||
case $# in
|
case $# in
|
||||||
0)
|
0)
|
||||||
;;
|
;;
|
||||||
1)
|
|
||||||
[ -n "$SHOREWALL_DIR" -o -n "$FAST" ] && usage 2
|
|
||||||
|
|
||||||
if [ ! -d $1 ]; then
|
|
||||||
if [ -e $1 ]; then
|
|
||||||
echo "$1 is not a directory" >&2 && exit 2
|
|
||||||
else
|
|
||||||
echo "Directory $1 does not exist" >&2 && exit 2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
SHOREWALL_DIR=$
|
|
||||||
export SHOREWALL_DIR
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
@ -335,20 +321,6 @@ restart_command() {
|
|||||||
case $# in
|
case $# in
|
||||||
0)
|
0)
|
||||||
;;
|
;;
|
||||||
1)
|
|
||||||
[ -n "$SHOREWALL_DIR" ] && usage 2
|
|
||||||
|
|
||||||
if [ ! -d $1 ]; then
|
|
||||||
if [ -e $1 ]; then
|
|
||||||
echo "$1 is not a directory" >&2 && exit 2
|
|
||||||
else
|
|
||||||
echo "Directory $1 does not exist" >&2 && exit 2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
SHOREWALL_DIR=$1
|
|
||||||
export SHOREWALL_DIR
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
@ -393,11 +365,11 @@ usage() # $1 = exit status
|
|||||||
echo " logwatch [<refresh interval>]"
|
echo " logwatch [<refresh interval>]"
|
||||||
echo " reject <address> ..."
|
echo " reject <address> ..."
|
||||||
echo " reset"
|
echo " reset"
|
||||||
echo " restart [ -n ] [ <directory> ]"
|
echo " restart [ -n ]"
|
||||||
echo " restore [ -n ] [ <file name> ]"
|
echo " restore [ -n ] [ <file name> ]"
|
||||||
echo " save [ <file name> ]"
|
echo " save [ <file name> ]"
|
||||||
echo " show [ -x ] [ -m ] [ -f ] [<chain> [ <chain> ... ]|capabilities|classifiers|config|connections|ip|log|mangle|nat|routing|tc|zones]"
|
echo " show [ -x ] [ -m ] [ -f ] [<chain> [ <chain> ... ]|capabilities|classifiers|config|connections|ip|log|mangle|nat|routing|tc|zones]"
|
||||||
echo " start [ -f ] [ -n ] [ <directory> ]"
|
echo " start [ -f ] [ -n ]"
|
||||||
echo " stop"
|
echo " stop"
|
||||||
echo " status"
|
echo " status"
|
||||||
echo " version"
|
echo " version"
|
||||||
@ -422,7 +394,6 @@ if [ $# -gt 0 ] && [ "$1" = "nolock" ]; then
|
|||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SHOREWALL_DIR=
|
|
||||||
IPT_OPTIONS="-nv"
|
IPT_OPTIONS="-nv"
|
||||||
FAST=
|
FAST=
|
||||||
VERBOSE_OFFSET=0
|
VERBOSE_OFFSET=0
|
||||||
@ -447,25 +418,6 @@ while [ $finished -eq 0 ]; do
|
|||||||
|
|
||||||
while [ -n "$option" ]; do
|
while [ -n "$option" ]; do
|
||||||
case $option in
|
case $option in
|
||||||
c)
|
|
||||||
[ $# -eq 1 ] && usage 1
|
|
||||||
|
|
||||||
if [ ! -d $2 ]; then
|
|
||||||
if [ -e $2 ]; then
|
|
||||||
echo "$2 is not a directory" >&2 && exit 2
|
|
||||||
else
|
|
||||||
echo "Directory $2 does not exist" >&2 && exit 2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
SHOREWALL_DIR=$2
|
|
||||||
option=
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
e*)
|
|
||||||
EXPORT=Yes
|
|
||||||
option=${option#e}
|
|
||||||
;;
|
|
||||||
x*)
|
x*)
|
||||||
IPT_OPTIONS="-xnv"
|
IPT_OPTIONS="-xnv"
|
||||||
option=${option#x}
|
option=${option#x}
|
||||||
@ -511,7 +463,6 @@ if [ $# -eq 0 ]; then
|
|||||||
usage 1
|
usage 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$SHOREWALL_DIR" ] && export SHOREWALL_DIR
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||||
MUTEX_TIMEOUT=
|
MUTEX_TIMEOUT=
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user