From b48d89d3d875f8e8e418aceb194b65cc1af8666d Mon Sep 17 00:00:00 2001 From: Simon Schuster Date: Sun, 18 Sep 2016 13:20:45 +0200 Subject: [PATCH] Add the section-type alias in the uci module --- src/uci.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uci.lua b/src/uci.lua index 66db269..5e1bf16 100644 --- a/src/uci.lua +++ b/src/uci.lua @@ -287,7 +287,7 @@ function check_parameters(module) or (not p["state"]) then module:fail_json({msg="Both name and state are required to set/unset values"}) end - + -- when performing an "uci set", a value is required if ("set" == p["state"] or "present" == p["state"]) then if p["name"]["option"] and not p["value"] then -- Setting a regular value @@ -317,7 +317,7 @@ function main(arg) reload = { aliases = {"reload_configs", "reload-configs"}, type='bool'}, autocommit = { default=true, type="bool" }, forcelist = { default=false, type="bool" }, - type = { type="str" }, + type = { aliases = {"section-type"}, type="str" }, socket = { type="path" }, timeout = { type="int"} })