From: Felix Fietkau Date: Mon, 16 Dec 2024 11:33:19 +0000 (+0100) Subject: unet-cli: fix defaults on create X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e4a24cdfbc1cbdb38f1958440f2a06529df1c7f4;p=project%2Funetd.git unet-cli: fix defaults on create Signed-off-by: Felix Fietkau --- diff --git a/scripts/unet-cli b/scripts/unet-cli index 8cb790e..9cbe64f 100755 --- a/scripts/unet-cli +++ b/scripts/unet-cli @@ -400,6 +400,9 @@ case 'import': break; case 'create': case 'set-config': + for (let key, val in defaults) + args[key] ??= `${val}`; + set_fields(net_data.config, { port: "int", keepalive: "int", @@ -407,9 +410,6 @@ case 'set-config': set_field("int", net_data.config, "peer-exchange-port", args.pex_port); set_field("array", net_data.config, "stun-servers", args.stun); - for (let key, val in defaults) - args[key] ??= `${val}`; - let seed_arg; if ("seed" in args) {