Skip to content

Commit 365d87d

Browse files
committed
Improve VPN setup
- Install package libcrypt-dev on Ubuntu/Debian, and package libxcrypt-devel on CentOS 8+, which are needed for Libreswan compilation. This change fixes VPN setup on Ubuntu 26.04.
1 parent 18f78d7 commit 365d87d

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

extras/vpnupgrade_centos.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ install_pkgs_1() {
171171
libcap-ng-devel libselinux-devel curl-devel nss-tools \
172172
flex bison gcc make wget sed tar >/dev/null
173173
) || exiterr2
174+
if [ "$os_ver" != 7 ]; then
175+
(
176+
set -x
177+
yum -y -q install libxcrypt-devel >/dev/null
178+
) || exiterr2
179+
fi
174180
}
175181

176182
install_pkgs_2() {

extras/vpnupgrade_ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ install_pkgs() {
177177
set -x
178178
apt-get -yqq install libnss3-dev libnspr4-dev pkg-config \
179179
libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev \
180-
$p1 libnss3-tools libevent-dev libsystemd-dev \
180+
$p1 libnss3-tools libevent-dev libsystemd-dev libcrypt-dev \
181181
flex bison gcc make wget sed >/dev/null
182182
) || exiterr2
183183
if { [ "$os_type" = "ubuntu" ] && [ -n "$ubuntu_ver" ] \

vpnsetup_centos.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ install_vpn_pkgs_1() {
277277
libcap-ng-devel libselinux-devel curl-devel nss-tools \
278278
flex bison gcc make util-linux ppp >/dev/null
279279
) || exiterr2
280+
if [ "$os_ver" != 7 ]; then
281+
(
282+
set -x
283+
yum -y -q install libxcrypt-devel >/dev/null
284+
) || exiterr2
285+
fi
280286
}
281287

282288
install_vpn_pkgs_2() {

vpnsetup_ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ install_vpn_pkgs() {
282282
set -x
283283
apt-get -yqq install libnss3-dev libnspr4-dev pkg-config \
284284
libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev \
285-
$p1 flex bison gcc make libnss3-tools \
285+
$p1 flex bison gcc make libnss3-tools libcrypt-dev \
286286
libevent-dev libsystemd-dev uuid-runtime ppp xl2tpd >/dev/null
287287
) || exiterr2
288288
if { [ "$os_type" = "ubuntu" ] && [ -n "$ubuntu_ver" ] \

0 commit comments

Comments
 (0)