diff --git a/packages/falter-berlin-bbbdigger/Makefile b/packages/falter-berlin-bbbdigger/Makefile index 36f16940..ccaccd91 100644 --- a/packages/falter-berlin-bbbdigger/Makefile +++ b/packages/falter-berlin-bbbdigger/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=falter-berlin-bbbdigger -PKG_VERSION:=0.0.3 -PKG_RELEASE:=3 +PKG_VERSION:=0.0.4 +PKG_RELEASE:=4 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/packages/falter-berlin-bbbdigger/files/postinst.sh b/packages/falter-berlin-bbbdigger/files/postinst.sh index 11528b1d..525daf00 100755 --- a/packages/falter-berlin-bbbdigger/files/postinst.sh +++ b/packages/falter-berlin-bbbdigger/files/postinst.sh @@ -8,6 +8,9 @@ # # All other config sections are overwritten with current settings +# shellcheck disable=SC2034 + +# shellcheck source=/dev/null . /lib/functions.sh TUNNEL_SRV='_bbb-vpn._udp.berlin.freifunk.net' @@ -21,7 +24,7 @@ if [ $? -eq 1 ]; then # start with b6 for Berliner 6ackbone MAC="b6" for byte in 2 3 4 5 6; do - MAC=$MAC`dd if=/dev/urandom bs=1 count=1 2> /dev/null | hexdump -e '1/1 ":%02x"'` + MAC=$MAC$(dd if=/dev/urandom bs=1 count=1 2> /dev/null | hexdump -e '1/1 ":%02x"') done fi @@ -29,7 +32,7 @@ UUID=$(uci -q get tunneldigger.${IFACE}.uuid) if [ $? -eq 1 ]; then UUID=$MAC for byte in 7 8 9 10; do - UUID=$UUID`dd if=/dev/urandom bs=1 count=1 2> /dev/null | hexdump -e '1/1 ":%02x"'` + UUID=$UUID$(dd if=/dev/urandom bs=1 count=1 2> /dev/null | hexdump -e '1/1 ":%02x"') done fi @@ -38,7 +41,7 @@ uci set tunneldigger.$IFACE=broker # remove old address list in favor of srv uci -q delete tunneldigger.$IFACE.address uci set tunneldigger.$IFACE.srv=$TUNNEL_SRV -uci set tunneldigger.$IFACE.uuid=$UUID +uci set tunneldigger.$IFACE.uuid="$UUID" uci set tunneldigger.$IFACE.interface=$IFACE uci set tunneldigger.$IFACE.broker_selection=usage uci set tunneldigger.$IFACE.bind_interface=$BIND @@ -46,7 +49,7 @@ uci set tunneldigger.$IFACE.enabled=1 # network setup uci set network.${IFACE}_dev=device -uci set network.${IFACE}_dev.macaddr=$MAC +uci set network.${IFACE}_dev.macaddr="$MAC" uci set network.${IFACE}_dev.name=$IFACE uci set network.$IFACE=interface @@ -59,7 +62,7 @@ uci -q add_list firewall.zone_freifunk.network=$IFACE # olsr setup (first remove it and add it again) SECTION=$(uci show olsrd | grep ${IFACE} | cut -d . -f 1-2) -[ ! -z $SECTION ] && uci delete $SECTION +[ -n "$SECTION" ] && uci delete "$SECTION" uci add olsrd Interface uci set olsrd.@Interface[-1].ignore=0 uci set olsrd.@Interface[-1].interface=$IFACE