fff-babeld: clean up type/rxcost option handling

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
This commit is contained in:
Johannes Kimmel 2021-02-17 06:35:48 +01:00
parent fcb19bd233
commit 057541129d
1 changed files with 2 additions and 10 deletions

View File

@ -47,18 +47,10 @@ configure() {
fi
# get type
if type=$(uci -q get gateway.$name.type); then
type="$type"
else
type=wired
fi
type=$(uci -q get gateway.$name.type) || type=wired
# get rxcost
if rxcost=$(uci -q get gateway.$name.rxcost); then
rxcost="$rxcost"
else
rxcost=96
fi
rxcost=$(uci -q get gateway.$name.rxcost) || rxcost=96
# add interface
uci set network.$prefixname=interface