forked from extern/shorewall_code
Add aliases for certain parameters.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
0d19c99699
commit
9713fe358b
27
Shorewall-core/configure
vendored
27
Shorewall-core/configure
vendored
@ -27,12 +27,6 @@
|
||||
################################################################################################
|
||||
declare -A params
|
||||
declare -A options
|
||||
declare -u pn
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <var>=<val> ..." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
getfileparams() {
|
||||
while read option; do
|
||||
@ -52,16 +46,35 @@ getfileparams() {
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <var>=<val> ..." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for p in $@; do
|
||||
p=${p#--}
|
||||
[ -n "${p}" ] && {
|
||||
pn=${p%=*}
|
||||
pv=${p#*=}
|
||||
[ -n ${pn} ] && params[${pn}]="${pv}"
|
||||
if [ -n ${pn} ]; then
|
||||
case ${pn} in
|
||||
VENDOR)
|
||||
pn=HOST
|
||||
;;
|
||||
SHAREDSTATEDIR)
|
||||
pn=VARDIR
|
||||
;;
|
||||
DATADIR)
|
||||
pn=SHAREDIR
|
||||
;;
|
||||
esac
|
||||
|
||||
params[${pn}]="${pv}"
|
||||
}
|
||||
done
|
||||
|
||||
vendor=${params[HOST]}
|
||||
|
||||
if [ -z "$vendor" ]; then
|
||||
rcfile=shorewallrc.default
|
||||
vendor=linux
|
||||
|
Loading…
Reference in New Issue
Block a user