wireguard: converted whitespaces from space to tab

With this change, the file is reduced from 5186 bytes to 4649 bytes that
its approximately 10.5 percent less memory consumption. For small
devices, sometimes every byte counts.
Also, all other protocol handler use tabs instead of spaces.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2019-04-09 10:52:03 +02:00 committed by Hans Dedecker
parent c8a8294f6e
commit 78b6931a1a

View File

@ -2,21 +2,18 @@
# Copyright 2016-2017 Dan Luedtke <mail@danrl.com>
# Licensed to the public under the Apache License 2.0.
WG=/usr/bin/wg
if [ ! -x $WG ]; then
logger -t "wireguard" "error: missing wireguard-tools (${WG})"
exit 0
fi
[ -n "$INCLUDE_ONLY" ] || {
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
}
proto_wireguard_init_config() {
proto_config_add_string "private_key"
proto_config_add_int "listen_port"
@ -26,7 +23,6 @@ proto_wireguard_init_config() {
no_proto_task=1
}
proto_wireguard_setup_peer() {
local peer_config="$1"
@ -96,7 +92,6 @@ proto_wireguard_setup_peer() {
fi
}
proto_wireguard_setup() {
local config="$1"
local wg_dir="/tmp/wireguard"
@ -189,13 +184,11 @@ proto_wireguard_setup() {
proto_send_update "${config}"
}
proto_wireguard_teardown() {
local config="$1"
ip link del dev "${config}" >/dev/null 2>&1
}
[ -n "$INCLUDE_ONLY" ] || {
add_protocol wireguard
}