From 35b8ec140607792c4713fab755c55544afe73654 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 27 Oct 2019 15:06:06 +0900 Subject: [PATCH] Update wireguard.sh Added support CentOS 8 --- wireguard.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wireguard.sh b/wireguard.sh index 4c6147b..6c9bb6b 100644 --- a/wireguard.sh +++ b/wireguard.sh @@ -260,6 +260,7 @@ install_wg_2() { _error_detect "dnf -y install gcc" _error_detect "dnf -y install make" _error_detect "dnf -y install libmnl-devel" + _error_detect "dnf -y install elfutils-libelf-devel" ;; centos) _error_detect "yum -y install epel-release" @@ -268,7 +269,10 @@ install_wg_2() { _error_detect "yum -y install bc" _error_detect "yum -y install gcc" _error_detect "yum -y install make" + _error_detect "yum -y install yum-utils" + [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 8 ] && _error_detect "yum-config-manager --enable PowerTools" _error_detect "yum -y install libmnl-devel" + _error_detect "yum -y install elfutils-libelf-devel" ;; *) ;; # do nothing