Skip to content
Snippets Groups Projects
Unverified Commit 604e7e54 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

treewide: fix previously disabled shellcheck warnings

Warnings are either fixed properly, or disabled in a more fine-grained
manner.
parent bd746da4
No related branches found
No related tags found
No related merge requests found
Showing
with 39 additions and 10 deletions
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
start_enabled alfred
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
stop alfred
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh
# shellcheck disable=SC1091
. /lib/functions/system.sh
get_mac_label
#!/bin/sh
# shellcheck disable=SC1091
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
......
#!/bin/sh
# shellcheck disable=SC1091
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
......@@ -17,7 +19,8 @@ xor2() {
}
is_layer3_device () {
local addrlen="$(cat "/sys/class/net/$1/addr_len")"
local addrlen
addrlen="$(cat "/sys/class/net/$1/addr_len")"
test "$addrlen" -eq 0
}
......@@ -34,7 +37,8 @@ interface_linklocal() {
return
fi
local macaddr="$(ubus call network.device status '{"name": "'"$1"'"}' | jsonfilter -e '@.macaddr')"
local macaddr
macaddr="$(ubus call network.device status '{"name": "'"$1"'"}' | jsonfilter -e '@.macaddr')"
local oldIFS="$IFS"; IFS=':'; set -- $macaddr; IFS="$oldIFS"
echo "fe80::$(xor2 "$1")$2:$3ff:fe$4:$5$6"
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
# Start after network
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
# Stop before network
......
#!/bin/sh
# shellcheck disable=SC1091,SC2034
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
......@@ -37,7 +39,8 @@ proto_gluon_bat0_renew() {
proto_gluon_bat0_setup() {
local config="$1"
local routing_algo="$(lookup_site 'mesh.batman_adv.routing_algo' 'BATMAN_IV')"
local routing_algo
routing_algo="$(lookup_site 'mesh.batman_adv.routing_algo' 'BATMAN_IV')"
local gw_mode
json_get_vars gw_mode
......@@ -54,7 +57,8 @@ proto_gluon_bat0_setup() {
batctl gw_mode "server"
;;
client)
local gw_sel_class="$(lookup_site 'mesh.batman_adv.gw_sel_class')"
local gw_sel_class
gw_sel_class="$(lookup_site 'mesh.batman_adv.gw_sel_class')"
if [ -n "$gw_sel_class" ]; then
batctl gw_mode "client" "$gw_sel_class"
else
......@@ -67,7 +71,8 @@ proto_gluon_bat0_setup() {
esac
local primary0_mac="$(lua -e 'print(require("gluon.util").generate_mac(3))')"
local primary0_mac
primary0_mac="$(lua -e 'print(require("gluon.util").generate_mac(3))')"
ip link add primary0 type dummy
echo 1 > /proc/sys/net/ipv6/conf/primary0/disable_ipv6
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
pidof netifd >/dev/null || start_enabled network
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
wifi down
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh
# shellcheck disable=SC1091,SC2034
INCLUDE_ONLY=1
. /lib/netifd/proto/wireguard.sh
......
#!/bin/sh
# shellcheck disable=SC1091
# FIXME: The following lints should not need to be disabled
# shellcheck disable=SC2034,SC2155
PROTO_DEBUG=1
. /lib/functions.sh
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
start_enabled gluon-radvd
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
stop gluon-radvd
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh
stop gluon-respondd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment