mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Installer tweaks
- Give instructions when Shorewall-core installer finds no rc file - Update help Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5aed14ffdc
commit
8a18dac870
@ -27,7 +27,7 @@ VERSION=xxx #The Build script inserts the actual version
|
|||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
ME=$(basename $0)
|
ME=$(basename $0)
|
||||||
echo "usage: $ME [ <rcfile> ] "
|
echo "usage: $ME [ <configuration-file> ] "
|
||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
exit $1
|
exit $1
|
||||||
@ -148,9 +148,6 @@ if [ $# -eq 0 ]; then
|
|||||||
elif [ -f ~/.shorewallrc ]; then
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
else
|
|
||||||
file=./shorewallrc.default
|
|
||||||
. $file
|
|
||||||
fi
|
fi
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
file=$1
|
file=$1
|
||||||
@ -254,6 +251,23 @@ case "$HOST" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ -z "$file" ]; then
|
||||||
|
if $HOST = linux; then
|
||||||
|
file=shorewallrc.default
|
||||||
|
else
|
||||||
|
file=$shorewallrc.${HOST}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "You have not specified a configuration file and ~/.shorewallrc does not exist" >&2
|
||||||
|
echo "Shorewall-core $VERSION has determined that the $file configuration is appropriate for your system" >&2
|
||||||
|
echo "Please review the settings in that file. If you wish to change them, make a copy and modify the copy" >&2
|
||||||
|
echo "Then re-run install.sh passing either $file or the name of your modified copy" >&2
|
||||||
|
echo "" >&2
|
||||||
|
echo "Example:" >&2
|
||||||
|
echo "" >&2
|
||||||
|
echo " ./install.sh $file" &>2
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$DESTDIR" ]; then
|
if [ -n "$DESTDIR" ]; then
|
||||||
if [ $BUILD != cygwin ]; then
|
if [ $BUILD != cygwin ]; then
|
||||||
if [ `id -u` != 0 ] ; then
|
if [ `id -u` != 0 ] ; then
|
||||||
|
@ -28,7 +28,7 @@ VERSION=xxx #The Build script inserts the actual version.
|
|||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
ME=$(basename $0)
|
ME=$(basename $0)
|
||||||
echo "usage: $ME"
|
echo "usage: $ME [ <configuration-file> ]"
|
||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
exit $1
|
exit $1
|
||||||
@ -143,7 +143,7 @@ if [ $# -eq 0 ]; then
|
|||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
else
|
else
|
||||||
fatal_error "No rcfile specified and ~/.shorewallrc not found"
|
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||||
fi
|
fi
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
file=$1
|
file=$1
|
||||||
|
@ -27,7 +27,7 @@ VERSION=xxx #The Build script inserts the actual version
|
|||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
ME=$(basename $0)
|
ME=$(basename $0)
|
||||||
echo "usage: $ME"
|
echo "usage: $ME [ <configuration-file> ]"
|
||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
exit $1
|
exit $1
|
||||||
@ -158,7 +158,7 @@ if [ $# -eq 0 ]; then
|
|||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
else
|
else
|
||||||
fatal_error "No rcfile specified and ~/.shorewallrc not found"
|
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||||
fi
|
fi
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
file=$1
|
file=$1
|
||||||
|
@ -30,7 +30,7 @@ VERSION=xxx #The Build script inserts the actual version
|
|||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
ME=$(basename $0)
|
ME=$(basename $0)
|
||||||
echo "usage: $ME"
|
echo "usage: $ME [ <configuration-file> ]"
|
||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
echo " $ME -s"
|
echo " $ME -s"
|
||||||
@ -177,11 +177,12 @@ if [ $# -eq 0 ]; then
|
|||||||
#
|
#
|
||||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
||||||
. ../shorewall-pkg.config || exit 1
|
. ../shorewall-pkg.config || exit 1
|
||||||
|
file = ../shorewall-pkg.config
|
||||||
elif [ -f ~/.shorewallrc ]; then
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
else
|
else
|
||||||
fatal_error "No rcfile specified and ~/.shorewallrc not found"
|
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||||
fi
|
fi
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
file=$1
|
file=$1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user