forked from extern/shorewall_code
Rename VARDIR to VARLIB in shorewallrc
- Done so that existing shorewallrc files are still valid. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
bf70f6e71e
commit
e66d9e3418
14
Shorewall-core/configure
vendored
14
Shorewall-core/configure
vendored
@ -76,7 +76,7 @@ for p in $@; do
|
|||||||
pn=HOST
|
pn=HOST
|
||||||
;;
|
;;
|
||||||
SHAREDSTATEDIR)
|
SHAREDSTATEDIR)
|
||||||
pn=VARDIR
|
pn=VARLIB
|
||||||
;;
|
;;
|
||||||
DATADIR)
|
DATADIR)
|
||||||
pn=SHAREDIR
|
pn=SHAREDIR
|
||||||
@ -161,6 +161,17 @@ if [ $# -gt 0 ]; then
|
|||||||
echo '#' >> shorewallrc
|
echo '#' >> shorewallrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${options[VARLIB]}" ]; then
|
||||||
|
if [ -z "${options[VARDIR]}" ]; then
|
||||||
|
options[VARDIR]='${VARLIB}/${PRODUCT}'
|
||||||
|
fi
|
||||||
|
elif [ -n "${options[VARDIR]}" ]; then
|
||||||
|
if [ -z "{$options[VARLIB]}" ]; then
|
||||||
|
options[VARLIB]=${options[VARDIR]}
|
||||||
|
options[VARDIR]='${VARLIB}/${PRODUCT}'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for on in \
|
for on in \
|
||||||
HOST \
|
HOST \
|
||||||
PREFIX \
|
PREFIX \
|
||||||
@ -180,6 +191,7 @@ for on in \
|
|||||||
SYSCONFDIR \
|
SYSCONFDIR \
|
||||||
SPARSE \
|
SPARSE \
|
||||||
ANNOTATED \
|
ANNOTATED \
|
||||||
|
VARLIB \
|
||||||
VARDIR
|
VARDIR
|
||||||
do
|
do
|
||||||
echo "$on=${options[${on}]}"
|
echo "$on=${options[${on}]}"
|
||||||
|
@ -38,7 +38,7 @@ my %params;
|
|||||||
my %options;
|
my %options;
|
||||||
|
|
||||||
my %aliases = ( VENDOR => 'HOST',
|
my %aliases = ( VENDOR => 'HOST',
|
||||||
SHAREDSTATEDIR => 'VARDIR',
|
SHAREDSTATEDIR => 'VARLIB',
|
||||||
DATADIR => 'SHAREDIR' );
|
DATADIR => 'SHAREDIR' );
|
||||||
|
|
||||||
for ( @ARGV ) {
|
for ( @ARGV ) {
|
||||||
@ -123,6 +123,15 @@ printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d
|
|||||||
|
|
||||||
print $outfile "# Input: @ARGV\n#\n" if @ARGV;
|
print $outfile "# Input: @ARGV\n#\n" if @ARGV;
|
||||||
|
|
||||||
|
if ( $options{VARLIB} ) {
|
||||||
|
unless ( $options{VARDIR} ) {
|
||||||
|
$options{VARDIR} = '${VARLIB}/${PRODUCT}';
|
||||||
|
}
|
||||||
|
} elsif ( $options{VARDIR} ) {
|
||||||
|
$options{VARLIB} = $options{VARDIR};
|
||||||
|
$options{VARDIR} = '${VARLIB}/${PRODUCT}';
|
||||||
|
}
|
||||||
|
|
||||||
for ( qw/ HOST
|
for ( qw/ HOST
|
||||||
PREFIX
|
PREFIX
|
||||||
SHAREDIR
|
SHAREDIR
|
||||||
@ -141,6 +150,7 @@ for ( qw/ HOST
|
|||||||
SYSCONFDIR
|
SYSCONFDIR
|
||||||
SPARSE
|
SPARSE
|
||||||
ANNOTATED
|
ANNOTATED
|
||||||
|
VARLIB
|
||||||
VARDIR / ) {
|
VARDIR / ) {
|
||||||
|
|
||||||
my $val = $options{$_} || '';
|
my $val = $options{$_} || '';
|
||||||
|
@ -164,7 +164,12 @@ else
|
|||||||
usage 1
|
usage 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for var in SHAREDIR LIBEXECDIR PERLLIBDIR CONFDIR SBINDIR VARDIR; do
|
if [ -z "${VARLIB}" ]; then
|
||||||
|
VARLIB=${VARDIR}
|
||||||
|
VARDIR='${VARLIB}/${PRODUCT}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
for var in SHAREDIR LIBEXECDIR PERLLIBDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||||
require $var
|
require $var
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ if [ -z "$g_readrc" ]; then
|
|||||||
g_sharedir="$SHAREDIR"/$g_program
|
g_sharedir="$SHAREDIR"/$g_program
|
||||||
g_sbindir="$SBINDIR"
|
g_sbindir="$SBINDIR"
|
||||||
g_perllib="$PERLLIBDIR"
|
g_perllib="$PERLLIBDIR"
|
||||||
g_vardir="$VARDIR"
|
|
||||||
g_confdir="$CONFDIR"/$g_program
|
g_confdir="$CONFDIR"/$g_program
|
||||||
g_readrc=1
|
g_readrc=1
|
||||||
fi
|
fi
|
||||||
@ -76,7 +75,10 @@ case $g_program in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
VARDIR=${VARDIR}/${g_program}
|
if [ -z "${VARLIB}" ]; then
|
||||||
|
VARLIB=${VARDIR}
|
||||||
|
VARDIR=${VARLIB}/$g_program
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Conditionally produce message
|
# Conditionally produce message
|
||||||
|
@ -17,4 +17,4 @@ ANNOTATED= #Unused on OS X
|
|||||||
SYSTEMD= #Unused on OS X
|
SYSTEMD= #Unused on OS X
|
||||||
SYSCONFDIR= #Unused on OS X
|
SYSCONFDIR= #Unused on OS X
|
||||||
SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR.
|
SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR.
|
||||||
VARDIR=/var/lib #Unused on OS X
|
VARLIB=/var/lib #Unused on OS X
|
||||||
|
@ -17,4 +17,4 @@ ANNOTATED= #If non-zero, annotated configuration fil
|
|||||||
SYSCONFDIR= #Directory where SysV init parameter files are installed
|
SYSCONFDIR= #Directory where SysV init parameter files are installed
|
||||||
SYSTEMD= #Directory where .service files are installed (systems running systemd only)
|
SYSTEMD= #Directory where .service files are installed (systems running systemd only)
|
||||||
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
VARDIR=/var/lib #Directory where product variable data is stored.
|
VARLIB=/var/lib #Directory where product variable data is stored.
|
||||||
|
@ -17,4 +17,4 @@ ANNOTATED= #Unused on Cygwin
|
|||||||
SYSTEMD= #Unused on Cygwin
|
SYSTEMD= #Unused on Cygwin
|
||||||
SYSCONFDIR= #Unused on Cygwin
|
SYSCONFDIR= #Unused on Cygwin
|
||||||
SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR.
|
SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR.
|
||||||
VARDIR=/var/lib #Unused on Cygwin
|
VARLIB=/var/lib #Unused on Cygwin
|
||||||
|
@ -18,4 +18,4 @@ SYSCONFFILE=default.debian #Name of the distributed file to be inst
|
|||||||
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
|
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
|
||||||
SYSTEMD= #Directory where .service files are installed (systems running systemd only)
|
SYSTEMD= #Directory where .service files are installed (systems running systemd only)
|
||||||
SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
VARDIR=/var/lib #Directory where product variable data is stored.
|
VARLIB=/var/lib #Directory where product variable data is stored.
|
||||||
|
@ -18,4 +18,4 @@ SYSTEMD= #Directory where .service files are inst
|
|||||||
SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR
|
SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR
|
||||||
SYSCONFDIR= #Directory where SysV init parameter files are installed
|
SYSCONFDIR= #Directory where SysV init parameter files are installed
|
||||||
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
VARDIR=/var/lib #Directory where product variable data is stored.
|
VARLIB=/var/lib #Directory where product variable data is stored.
|
||||||
|
@ -18,4 +18,4 @@ SYSTEMD=/lib/systemd/system #Directory where .service files are inst
|
|||||||
SYSCONFFILE=sysconfig #Name of the distributed file to be installed as $SYSCONFDIR/$PRODUCT
|
SYSCONFFILE=sysconfig #Name of the distributed file to be installed as $SYSCONFDIR/$PRODUCT
|
||||||
SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed
|
SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed
|
||||||
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
VARDIR=/var/lib #Directory where product variable data is stored.
|
VARLIB=/var/lib #Directory where product variable data is stored.
|
||||||
|
@ -19,4 +19,4 @@ SYSTEMD= #Name of the directory where .service
|
|||||||
SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR
|
SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR
|
||||||
SYSCONFDIR= #Name of the directory where SysV init parameter files are installed.
|
SYSCONFDIR= #Name of the directory where SysV init parameter files are installed.
|
||||||
ANNOTATED= #If non-empty, install annotated configuration files
|
ANNOTATED= #If non-empty, install annotated configuration files
|
||||||
VARDIR=/var/lib #Directory where product variable data is stored.
|
VARLIB=/var/lib #Directory where product variable data is stored.
|
||||||
|
@ -18,4 +18,4 @@ SYSTEMD= #Directory where .service
|
|||||||
SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR
|
SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR
|
||||||
SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed
|
SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed
|
||||||
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
VARDIR=/var/lib #Directory where persistent product data is stored.
|
VARLIB=/var/lib #Directory where persistent product data is stored.
|
||||||
|
@ -160,7 +160,12 @@ else
|
|||||||
usage 1
|
usage 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for var in SHAREDIR LIBEXECDIR CONFDIR SBINDIR VARDIR; do
|
if [ -z "${VARLIB}" ]; then
|
||||||
|
VARLIB=${VARDIR}
|
||||||
|
VARDIR='${VARLIB}/${PRODUCT}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
for var in SHAREDIR LIBEXECDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||||
require $var
|
require $var
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -171,7 +171,12 @@ else
|
|||||||
usage 1
|
usage 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for var in SHAREDIR LIBEXECDIRDIRDIR CONFDIR SBINDIR VARDIR; do
|
if [ -z "${VARLIB}" ]; then
|
||||||
|
VARLIB=${VARDIR}
|
||||||
|
VARDIR='${VARLIB}/${PRODUCT}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
for var in SHAREDIR LIBEXECDIRDIRDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||||
require $var
|
require $var
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -307,7 +312,7 @@ if [ -z "$DESTDIR" -a -d ${CONFDIR}/$PRODUCT ]; then
|
|||||||
else
|
else
|
||||||
rm -rf ${DESTDIR}${CONFDIR}/$PRODUCT
|
rm -rf ${DESTDIR}${CONFDIR}/$PRODUCT
|
||||||
rm -rf ${DESTDIR}${SHAREDIR}/$PRODUCT
|
rm -rf ${DESTDIR}${SHAREDIR}/$PRODUCT
|
||||||
rm -rf ${DESTDIR}${VARDIR}/$PRODUCT
|
rm -rf ${DESTDIR}${VARDIR}
|
||||||
[ "$LIBEXECDIR" = /usr/share ] || rm -rf ${DESTDIR}/usr/share/$PRODUCT/wait4ifup ${DESTDIR}/usr/share/$PRODUCT/shorecap
|
[ "$LIBEXECDIR" = /usr/share ] || rm -rf ${DESTDIR}/usr/share/$PRODUCT/wait4ifup ${DESTDIR}/usr/share/$PRODUCT/shorecap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -332,7 +337,7 @@ echo "$Product control program installed in ${DESTDIR}${SBINDIR}/$PRODUCT"
|
|||||||
mkdir -p ${DESTDIR}${CONFDIR}/$PRODUCT
|
mkdir -p ${DESTDIR}${CONFDIR}/$PRODUCT
|
||||||
mkdir -p ${DESTDIR}${SHAREDIR}/$PRODUCT
|
mkdir -p ${DESTDIR}${SHAREDIR}/$PRODUCT
|
||||||
mkdir -p ${DESTDIR}${LIBEXECDIR}/$PRODUCT
|
mkdir -p ${DESTDIR}${LIBEXECDIR}/$PRODUCT
|
||||||
mkdir -p ${DESTDIR}${VARDIR}/$PRODUCT
|
mkdir -p ${DESTDIR}${VARDIR}
|
||||||
|
|
||||||
chmod 755 ${DESTDIR}${CONFDIR}/$PRODUCT
|
chmod 755 ${DESTDIR}${CONFDIR}/$PRODUCT
|
||||||
chmod 755 ${DESTDIR}/usr/share/$PRODUCT
|
chmod 755 ${DESTDIR}/usr/share/$PRODUCT
|
||||||
|
@ -193,7 +193,12 @@ else
|
|||||||
usage 1
|
usage 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for var in SHAREDIR LIBEXECDIR PERLLIBDIR CONFDIR SBINDIR VARDIR; do
|
if [ -z "${VARLIB}" ]; then
|
||||||
|
VARLIB=${VARDIR}
|
||||||
|
VARDIR='${VARLIB}/${PRODUCT}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
for var in SHAREDIR LIBEXECDIR PERLLIBDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||||
require $var
|
require $var
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -371,7 +376,7 @@ mkdir -p ${DESTDIR}/${CONFDIR}/$PRODUCT
|
|||||||
mkdir -p ${DESTDIR}${LIBEXECDIR}/$PRODUCT
|
mkdir -p ${DESTDIR}${LIBEXECDIR}/$PRODUCT
|
||||||
mkdir -p ${DESTDIR}${PERLLIBDIR}/Shorewall
|
mkdir -p ${DESTDIR}${PERLLIBDIR}/Shorewall
|
||||||
mkdir -p ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
|
mkdir -p ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
|
||||||
mkdir -p ${DESTDIR}${VARDIR}/$PRODUCT
|
mkdir -p ${DESTDIR}${VARDIR}
|
||||||
|
|
||||||
chmod 755 ${DESTDIR}${CONFDIR}/$PRODUCT
|
chmod 755 ${DESTDIR}${CONFDIR}/$PRODUCT
|
||||||
chmod 755 ${DESTDIR}${SHAREDIR}/$PRODUCT
|
chmod 755 ${DESTDIR}${SHAREDIR}/$PRODUCT
|
||||||
|
Loading…
Reference in New Issue
Block a user