Skip to content
Snippets Groups Projects
Unverified Commit caba048e authored by Andreas Ziegler's avatar Andreas Ziegler Committed by GitHub
Browse files

Merge pull request #3467 from neocturne/shellcheck2

Shellcheck fixes + enabling of additional lints
parents 6cd474b7 092a086d
No related branches found
No related tags found
No related merge requests found
Showing
with 39 additions and 10 deletions
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
start_enabled alfred start_enabled alfred
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
stop alfred stop alfred
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh #!/bin/sh
# shellcheck disable=SC1091
. /lib/functions/system.sh . /lib/functions/system.sh
get_mac_label get_mac_label
#!/bin/sh #!/bin/sh
# shellcheck disable=SC1091
. /lib/functions.sh . /lib/functions.sh
. ../netifd-proto.sh . ../netifd-proto.sh
init_proto "$@" init_proto "$@"
......
#!/bin/sh #!/bin/sh
# shellcheck disable=SC1091
. /lib/functions.sh . /lib/functions.sh
. ../netifd-proto.sh . ../netifd-proto.sh
init_proto "$@" init_proto "$@"
...@@ -17,7 +19,8 @@ xor2() { ...@@ -17,7 +19,8 @@ xor2() {
} }
is_layer3_device () { 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 test "$addrlen" -eq 0
} }
...@@ -34,7 +37,8 @@ interface_linklocal() { ...@@ -34,7 +37,8 @@ interface_linklocal() {
return return
fi 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" local oldIFS="$IFS"; IFS=':'; set -- $macaddr; IFS="$oldIFS"
echo "fe80::$(xor2 "$1")$2:$3ff:fe$4:$5$6" echo "fe80::$(xor2 "$1")$2:$3ff:fe$4:$5$6"
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
# Start after network # Start after network
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
# Stop before network # Stop before network
......
#!/bin/sh #!/bin/sh
# shellcheck disable=SC1091,SC2034
. /lib/functions.sh . /lib/functions.sh
. ../netifd-proto.sh . ../netifd-proto.sh
init_proto "$@" init_proto "$@"
...@@ -37,7 +39,8 @@ proto_gluon_bat0_renew() { ...@@ -37,7 +39,8 @@ proto_gluon_bat0_renew() {
proto_gluon_bat0_setup() { proto_gluon_bat0_setup() {
local config="$1" 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 local gw_mode
json_get_vars gw_mode json_get_vars gw_mode
...@@ -54,7 +57,8 @@ proto_gluon_bat0_setup() { ...@@ -54,7 +57,8 @@ proto_gluon_bat0_setup() {
batctl gw_mode "server" batctl gw_mode "server"
;; ;;
client) 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 if [ -n "$gw_sel_class" ]; then
batctl gw_mode "client" "$gw_sel_class" batctl gw_mode "client" "$gw_sel_class"
else else
...@@ -67,7 +71,8 @@ proto_gluon_bat0_setup() { ...@@ -67,7 +71,8 @@ proto_gluon_bat0_setup() {
esac 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 ip link add primary0 type dummy
echo 1 > /proc/sys/net/ipv6/conf/primary0/disable_ipv6 echo 1 > /proc/sys/net/ipv6/conf/primary0/disable_ipv6
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
pidof netifd >/dev/null || start_enabled network pidof netifd >/dev/null || start_enabled network
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
wifi down wifi down
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh #!/bin/sh
# shellcheck disable=SC1091,SC2034
INCLUDE_ONLY=1 INCLUDE_ONLY=1
. /lib/netifd/proto/wireguard.sh . /lib/netifd/proto/wireguard.sh
......
#!/bin/sh #!/bin/sh
# shellcheck disable=SC1091
# FIXME: The following lints should not need to be disabled
# shellcheck disable=SC2034,SC2155
PROTO_DEBUG=1 PROTO_DEBUG=1
. /lib/functions.sh . /lib/functions.sh
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
start_enabled gluon-radvd start_enabled gluon-radvd
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
stop gluon-radvd stop gluon-radvd
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
......
#!/bin/sh #!/bin/sh
# shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
. /lib/gluon/autoupdater/lib.sh . /lib/gluon/autoupdater/lib.sh
stop gluon-respondd stop gluon-respondd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment