1
0
mirror of synced 2025-01-30 20:11:45 +03:00

Prepare for new requirements

- New requirements in Libreswan 3.18 (not released yet)
- libsystemd-dev (Ubuntu/Debian) or systemd-devel (CentOS)
- Applies only to systemd-based Linux distributions
This commit is contained in:
hwdsl2 2016-06-28 17:49:18 -05:00
parent 8475a9bb99
commit c28f9b0928
4 changed files with 10 additions and 4 deletions

View File

@ -124,6 +124,9 @@ wget -t 3 -T 30 -nv -O "$swan_file" "$swan_url1" || wget -t 3 -T 30 -nv -O "$swa
tar xzf "$swan_file" && /bin/rm -f "$swan_file" tar xzf "$swan_file" && /bin/rm -f "$swan_file"
cd "libreswan-$swan_ver" || { echoerr "Cannot enter Libreswan source dir. Aborting."; exit 1; } cd "libreswan-$swan_ver" || { echoerr "Cannot enter Libreswan source dir. Aborting."; exit 1; }
echo "WERROR_CFLAGS =" > Makefile.inc.local echo "WERROR_CFLAGS =" > Makefile.inc.local
if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then
apt-get -yq install libsystemd-dev
fi
make -s programs && make -s install make -s programs && make -s install
# Verify the install and clean up # Verify the install and clean up

View File

@ -111,12 +111,12 @@ yum -y install nss-devel nspr-devel pkgconfig pam-devel \
curl-devel flex bison gcc make \ curl-devel flex bison gcc make \
fipscheck-devel unbound-devel xmlto fipscheck-devel unbound-devel xmlto
# Installed Libevent2 # Install libevent2 and systemd-devel (CentOS 7)
if grep -qs "release 6" /etc/redhat-release; then if grep -qs "release 6" /etc/redhat-release; then
yum -y remove libevent-devel yum -y remove libevent-devel
yum -y install libevent2-devel yum -y install libevent2-devel
elif grep -qs "release 7" /etc/redhat-release; then elif grep -qs "release 7" /etc/redhat-release; then
yum -y install libevent-devel yum -y install libevent-devel systemd-devel
fi fi
# Compile and install Libreswan # Compile and install Libreswan

View File

@ -166,6 +166,9 @@ wget -t 3 -T 30 -nv -O "$swan_file" "$swan_url1" || wget -t 3 -T 30 -nv -O "$swa
tar xzf "$swan_file" && /bin/rm -f "$swan_file" tar xzf "$swan_file" && /bin/rm -f "$swan_file"
cd "libreswan-$swan_ver" || { echoerr "Cannot enter Libreswan source dir. Aborting."; exit 1; } cd "libreswan-$swan_ver" || { echoerr "Cannot enter Libreswan source dir. Aborting."; exit 1; }
echo "WERROR_CFLAGS =" > Makefile.inc.local echo "WERROR_CFLAGS =" > Makefile.inc.local
if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then
apt-get -yq install libsystemd-dev
fi
make -s programs && make -s install make -s programs && make -s install
# Verify the install and clean up # Verify the install and clean up

View File

@ -147,12 +147,12 @@ yum -y install ppp xl2tpd
# Install Fail2Ban to protect SSH # Install Fail2Ban to protect SSH
yum -y install fail2ban yum -y install fail2ban
# Installed Libevent2 # Install libevent2 and systemd-devel (CentOS 7)
if grep -qs "release 6" /etc/redhat-release; then if grep -qs "release 6" /etc/redhat-release; then
yum -y remove libevent-devel yum -y remove libevent-devel
yum -y install libevent2-devel yum -y install libevent2-devel
elif grep -qs "release 7" /etc/redhat-release; then elif grep -qs "release 7" /etc/redhat-release; then
yum -y install libevent-devel yum -y install libevent-devel systemd-devel
fi fi
# Compile and install Libreswan # Compile and install Libreswan