update kernel builder

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-06-25 14:46:30 -04:00
parent 7a95bd6503
commit afc07805f0
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -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