forked from extern/shorewall_code
Fix up lib.base during installation
- Shorewall-core installer creates all necessary directories.
This commit is contained in:
parent
c616e203df
commit
e48e13012c
@ -280,13 +280,36 @@ fi
|
|||||||
echo "Installing Shorewall Core Version $VERSION"
|
echo "Installing Shorewall Core Version $VERSION"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create /usr/share/shorewall
|
# Create directories
|
||||||
#
|
#
|
||||||
mkdir -p ${DESTDIR}${LIBEXECDIR}/shorewall
|
mkdir -p ${DESTDIR}${LIBEXECDIR}/shorewall
|
||||||
chmod 755 ${DESTDIR}${LIBEXECDIR}/shorewall
|
chmod 755 ${DESTDIR}${LIBEXECDIR}/shorewall
|
||||||
|
|
||||||
mkdir -p ${DESTDIR}${SHAREDIR}/shorewall
|
mkdir -p ${DESTDIR}${SHAREDIR}/shorewall
|
||||||
chmod 755 ${DESTDIR}${SHAREDIR}/shorewall
|
chmod 755 ${DESTDIR}${SHAREDIR}/shorewall
|
||||||
|
|
||||||
|
mkdir -p ${DESTDIR}${CONFDIR}
|
||||||
|
chmod 755 ${DESTDIR}${CONFDIR}
|
||||||
|
|
||||||
|
if [ -n "${SYSCONFDIR}" ]; then
|
||||||
|
mkdir -p ${DESTDIR}${SYSCONFDIR}
|
||||||
|
chmod 755 ${DESTDIR}${SYSCONFDIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${SYSTEMD}" ]; then
|
||||||
|
mkdir -p ${DESTDIR}${SYSTEMD}
|
||||||
|
chmod 755 ${DESTDIR}${SYSTEMD}
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ${DESTDIR}${SBINDIR}
|
||||||
|
chmod 755 ${DESTDIR}${SBINDIR}
|
||||||
|
|
||||||
|
mkdir -p ${DESTDIR}${MANDIR}
|
||||||
|
chmod 755 ${DESTDIR}${MANDIR}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Note: ${VARDIR} is created at run-time since it has always been
|
||||||
|
# a relocatable directory on a per-product basis
|
||||||
#
|
#
|
||||||
# Install wait4ifup
|
# Install wait4ifup
|
||||||
#
|
#
|
||||||
|
@ -45,6 +45,8 @@ if [ -z "$g_readrc" ]; then
|
|||||||
g_readrc=1
|
g_readrc=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
g_basedir=${SHAREDIR}/shorewall
|
||||||
|
|
||||||
case $g_program in
|
case $g_program in
|
||||||
shorewall)
|
shorewall)
|
||||||
SHAREDIR=${SHAREDIR}/shorewall
|
SHAREDIR=${SHAREDIR}/shorewall
|
||||||
|
@ -498,8 +498,8 @@ if [ -n "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PRODUCT} ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${SHAREDIR} != /usr/share ]; then
|
if [ ${SHAREDIR} != /usr/share ]; then
|
||||||
[ $PRODUCT = shorewall ] && eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SHAREDIR}/lib.base
|
eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SHAREDIR}/${PRODUCT}/lib.base
|
||||||
sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||||
|
@ -24,11 +24,10 @@
|
|||||||
|
|
||||||
g_program=shorewall-lite
|
g_program=shorewall-lite
|
||||||
g_family=4
|
g_family=4
|
||||||
|
#
|
||||||
|
# This may be altered by the installer
|
||||||
|
#
|
||||||
g_basedir=/usr/share/shorewall
|
g_basedir=/usr/share/shorewall
|
||||||
|
|
||||||
[ -n "${VARDIR:=/var/lib/$g_program}" ]
|
. ${g_basedir}/lib.base
|
||||||
[ -n "${SHAREDIR:=/usr/share/$g_program}" ]
|
|
||||||
[ -n "${CONFDIR:=/etc/$g_program}" ]
|
|
||||||
|
|
||||||
. /usr/share/shorewall/lib.base
|
|
||||||
|
|
||||||
|
@ -993,6 +993,7 @@ if [ $PRODUCT = shorewall6 ]; then
|
|||||||
# Symbolically link 'functions' to lib.base
|
# Symbolically link 'functions' to lib.base
|
||||||
#
|
#
|
||||||
ln -sf lib.base ${DESTDIR}${SHAREDIR}/$PRODUCT/functions
|
ln -sf lib.base ${DESTDIR}${SHAREDIR}/$PRODUCT/functions
|
||||||
|
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SHAREDIR}/${PRODUCT}/lib.base
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d Perl ]; then
|
if [ -d Perl ]; then
|
||||||
|
@ -24,11 +24,10 @@
|
|||||||
|
|
||||||
g_program=shorewall6
|
g_program=shorewall6
|
||||||
g_family=6
|
g_family=6
|
||||||
|
#
|
||||||
|
# This may be altered by the installer
|
||||||
|
#
|
||||||
g_basedir=/usr/share/shorewall
|
g_basedir=/usr/share/shorewall
|
||||||
|
|
||||||
[ -n "${VARDIR:=/var/lib/$g_program}" ]
|
. ${g_basedir}/lib.base
|
||||||
[ -n "${SHAREDIR:=/usr/share/$g_program}" ]
|
|
||||||
[ -n "${CONFDIR:=/etc/$g_program}" ]
|
|
||||||
|
|
||||||
. /usr/share/shorewall/lib.base
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user