From afc07805f0b8117647989ea98d3c6a60640d4b92 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Mon, 25 Jun 2018 14:46:30 -0400 Subject: [PATCH] update kernel builder Signed-off-by: Jess Frazelle --- kernel-builder/build_kernel | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel-builder/build_kernel b/kernel-builder/build_kernel index 61baea3..da96cf0 100755 --- a/kernel-builder/build_kernel +++ b/kernel-builder/build_kernel @@ -94,15 +94,13 @@ install_kernel(){ # Install Wireguard VPN into the kernel. - if [[ ! -f "${DIR}/net/wireguard/allowedips.c" ]]; then + if [[ "$OPT" == "wireguard" ]] && [[ ! -f "${DIR}/net/wireguard/allowedips.c" ]]; then echo "Applying patch for Wireguard VPN..." ( cd "$DIR" /wireguard/contrib/kernel-tree/create-patch.sh | patch -p1 ) echo "Patch for Wireguard VPN successfully applied!" - else - echo "Patch for Wireguard VPN has already been applied!" fi # Copy the config from /usr/src/config if it does not already exist. @@ -118,7 +116,9 @@ install_kernel(){ fi # Add the config options for Wireguard VPN. - echo "CONFIG_WIREGUARD=y" >> .config + if [[ "$OPT" == "wireguard" ]]; then + echo "CONFIG_WIREGUARD=y" >> .config + fi ) fi