tvheadend: cut subnet from lan IP reported by uci, fix bug #26681
authorMarius Dinu <redacted>
Wed, 4 Jun 2025 13:02:46 +0000 (16:02 +0300)
committerJosef Schlehofer <redacted>
Sat, 7 Jun 2025 18:26:47 +0000 (20:26 +0200)
Unannounced modifications (OpenWrt PR 13780) in uci network.lan.ipaddr broke tvheadend init script.
This commit updates the init script to cut the subnet from the ip address reported by uci.

Bug report: #26681

Reported-by: @DonKult
Tested-by: @DonKult
Signed-off-by: Marius Dinu <redacted>
multimedia/tvheadend/files/tvheadend.init

index 181bf62d86c1a9245ec6225f2eb4344284f28e4d..683a1df434b8f3ef053f7a73c3f135f4f410b55a 100644 (file)
@@ -63,7 +63,7 @@ load_uci_config() {
        config_get_bool ipv6 server ipv6 0
        [ "$ipv6" -eq 1 ] && procd_append_param command --ipv6
        config_get bindaddr server bindaddr
-       [ -z "$bindaddr" ] && bindaddr=$(uci get network.lan.ipaddr)
+       [ -z "$bindaddr" ] && bindaddr=$(uci get network.lan.ipaddr | cut -d / -f 1)
        [ -n "$bindaddr" ] && procd_append_param command --bindaddr "$bindaddr"
        config_get http_port server http_port
        [ -n "$http_port" ] && procd_append_param command --http_port "$http_port"
git clone https://git.99rst.org/PROJECT