base-files: Actually set default name
authorOlliver Schinagl <oliver@schinagl.nl>
Wed, 21 Sep 2022 15:57:53 +0000 (17:57 +0200)
committerOlliver Schinagl <oliver@schinagl.nl>
Thu, 22 Sep 2022 19:37:45 +0000 (21:37 +0200)
The currently used shell expansion doesn't seem to exist [0] and also
does not work. This surely was not intended, so lets allow default
naming to actually work.

[0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

Fixes: be09c5a3cd65 ("base-files: add board.d support for bridge device")
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
package/base-files/files/lib/functions/uci-defaults.sh

index 4f5b9634bb16b596bf140dfb170cec1dea239b80..86f16b51254c9d654987884d0e238527a5bd3850 100644 (file)
@@ -96,7 +96,7 @@ ucidef_set_interfaces_lan_wan() {
 
 ucidef_set_bridge_device() {
        json_select_object bridge
-       json_add_string name "${1:switch0}"
+       json_add_string name "${1:-switch0}"
        json_select ..
 }