mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-25 00:53:49 +01:00
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"
|
||||
|
||||
#
|
||||
# Create /usr/share/shorewall
|
||||
# Create directories
|
||||
#
|
||||
mkdir -p ${DESTDIR}${LIBEXECDIR}/shorewall
|
||||
chmod 755 ${DESTDIR}${LIBEXECDIR}/shorewall
|
||||
|
||||
mkdir -p ${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
|
||||
#
|
||||
|
@ -45,6 +45,8 @@ if [ -z "$g_readrc" ]; then
|
||||
g_readrc=1
|
||||
fi
|
||||
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
case $g_program in
|
||||
shorewall)
|
||||
SHAREDIR=${SHAREDIR}/shorewall
|
||||
|
@ -498,8 +498,8 @@ if [ -n "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PRODUCT} ]; then
|
||||
fi
|
||||
|
||||
if [ ${SHAREDIR} != /usr/share ]; then
|
||||
[ $PRODUCT = shorewall ] && eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SHAREDIR}/lib.base
|
||||
sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
||||
eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SHAREDIR}/${PRODUCT}/lib.base
|
||||
eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
||||
fi
|
||||
|
||||
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||
|
@ -24,11 +24,10 @@
|
||||
|
||||
g_program=shorewall-lite
|
||||
g_family=4
|
||||
#
|
||||
# This may be altered by the installer
|
||||
#
|
||||
g_basedir=/usr/share/shorewall
|
||||
|
||||
[ -n "${VARDIR:=/var/lib/$g_program}" ]
|
||||
[ -n "${SHAREDIR:=/usr/share/$g_program}" ]
|
||||
[ -n "${CONFDIR:=/etc/$g_program}" ]
|
||||
|
||||
. /usr/share/shorewall/lib.base
|
||||
. ${g_basedir}/lib.base
|
||||
|
||||
|
@ -993,6 +993,7 @@ if [ $PRODUCT = shorewall6 ]; then
|
||||
# Symbolically link 'functions' to lib.base
|
||||
#
|
||||
ln -sf lib.base ${DESTDIR}${SHAREDIR}/$PRODUCT/functions
|
||||
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' ${DESTDIR}/${SHAREDIR}/${PRODUCT}/lib.base
|
||||
fi
|
||||
|
||||
if [ -d Perl ]; then
|
||||
|
@ -24,11 +24,10 @@
|
||||
|
||||
g_program=shorewall6
|
||||
g_family=6
|
||||
#
|
||||
# This may be altered by the installer
|
||||
#
|
||||
g_basedir=/usr/share/shorewall
|
||||
|
||||
[ -n "${VARDIR:=/var/lib/$g_program}" ]
|
||||
[ -n "${SHAREDIR:=/usr/share/$g_program}" ]
|
||||
[ -n "${CONFDIR:=/etc/$g_program}" ]
|
||||
|
||||
. /usr/share/shorewall/lib.base
|
||||
. ${g_basedir}/lib.base
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user