From 31ef402ce20e6c5486153a23d7ec4ef9aa5f1ea0 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Fri, 8 Jan 2021 12:47:08 +0900 Subject: [PATCH] Update wireguard.sh --- wireguard.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wireguard.sh b/wireguard.sh index d7297a3..6d79182 100644 --- a/wireguard.sh +++ b/wireguard.sh @@ -293,7 +293,9 @@ install_wg_pkgs() { _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 --set-enabled powertools" + if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 8 ]; then + yum-config-manager --enable PowerTools > /dev/null 2>&1 || yum-config-manager --enable powertools > /dev/null 2>&1 + fi _error_detect "yum -y install libmnl-devel" _error_detect "yum -y install elfutils-libelf-devel" [ ! -d "/usr/src/kernels/$(uname -r)" ] && _error_detect "yum -y install kernel-headers" && _error_detect "yum -y install kernel-devel"