Fixing add command

This commit is contained in:
Philippe Caseiro 2018-11-09 14:38:58 +01:00
parent b26fa7f280
commit b9559bb9f3

5
uci.go
View File

@ -43,8 +43,9 @@ func (u *UCI) uciRun(param ...string) *Action {
// Add add an entry to UCI configuration, specify the Module and the value // Add add an entry to UCI configuration, specify the Module and the value
func (u *UCI) Add(module string, name string) *Action { func (u *UCI) Add(module string, name string) *Action {
cmd := "uci add" cmd := "/sbin/uci"
commandRes := u.exec.Run(cmd, module, name) opt := "add"
commandRes := u.exec.Run(cmd, opt, module, name)
return &Action{commandRes, fmt.Sprintf("%s %s %s", cmd, module, name)} return &Action{commandRes, fmt.Sprintf("%s %s %s", cmd, module, name)}
} }