1
0
mirror of synced 2024-12-01 17:16:02 +03:00

Workaround for Raspberry Pi

- Libreswan version 3.22 does not start on Raspberry Pi
- Install version 3.21 on these systems as a workaround
This commit is contained in:
hwdsl2 2017-10-27 00:14:38 -05:00
parent ef90b6ff19
commit 1488ac0ce8
2 changed files with 23 additions and 0 deletions

View File

@ -49,6 +49,26 @@ if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -q "Libreswan"; then
exiterr "This script requires Libreswan already installed." exiterr "This script requires Libreswan already installed."
fi fi
if [ "$swan_ver" = "3.22" ]; then
if grep -qs raspbian /etc/os-release; then
echo "Note: For Raspberry Pi systems, this script will install Libreswan"
echo "version 3.21 instead of 3.22, to avoid some recent bugs."
echo
printf "Do you wish to continue? [y/N] "
read -r response
case $response in
[yY][eE][sS]|[yY])
echo
swan_ver=3.21
;;
*)
echo "Aborting."
exit 1
;;
esac
fi
fi
if /usr/local/sbin/ipsec --version 2>/dev/null | grep -qF "$swan_ver"; then if /usr/local/sbin/ipsec --version 2>/dev/null | grep -qF "$swan_ver"; then
echo "You already have Libreswan version $swan_ver installed! " echo "You already have Libreswan version $swan_ver installed! "
echo "If you continue, the same version will be re-installed." echo "If you continue, the same version will be re-installed."

View File

@ -177,6 +177,9 @@ apt-get -yq install fail2ban || exiterr2
bigecho "Compiling and installing Libreswan..." bigecho "Compiling and installing Libreswan..."
swan_ver=3.22 swan_ver=3.22
if grep -qs raspbian /etc/os-release; then
swan_ver=3.21
fi
swan_file="libreswan-$swan_ver.tar.gz" swan_file="libreswan-$swan_ver.tar.gz"
swan_url1="https://github.com/libreswan/libreswan/archive/v$swan_ver.tar.gz" swan_url1="https://github.com/libreswan/libreswan/archive/v$swan_ver.tar.gz"
swan_url2="https://download.libreswan.org/$swan_file" swan_url2="https://download.libreswan.org/$swan_file"