Compare commits

...

2 Commits

Author SHA1 Message Date
yo
26ceb1630a Version bump 2023-08-26 19:36:36 +02:00
yo
87e9ae894a Fix no-op when set property of a jail with fullname (datastore/jail) 2023-08-26 19:32:34 +02:00
2 changed files with 15 additions and 15 deletions

View File

@ -105,20 +105,20 @@ func SetJailProperties(args []string) {
return
}
// Get jail by index to modify it
for i, _ := range gJails {
if gJails[i].Name == jail.Name {
for _, p := range props {
err := setStructFieldValue(&gJails[i], p.name, p.value)
if err != nil {
fmt.Printf("Error: %s\n", err.Error())
return
} else {
fmt.Printf("%s: %s set to %s\n", gJails[i].Name, p.name, p.value)
gJails[i].ConfigUpdated = true
}
}
writeConfigToDisk(&gJails[i], false)
cj, err := getJailFromArray(jail.Name, []string{""}, gJails)
if err != nil {
fmt.Printf("Error getting jail %s: %v\n", jail.Name, err)
return
}
for _, p := range props {
err := setStructFieldValue(cj, p.name, p.value)
if err != nil {
fmt.Printf("Error: %s\n", err.Error())
return
} else {
fmt.Printf("%s: %s set to %s\n", cj.Name, p.name, p.value)
}
}
cj.WriteConfigToDisk(false)
}

View File

@ -14,7 +14,7 @@ import (
)
const (
gVersion = "0.38a"
gVersion = "0.38b"
// TODO : Get from $jail_zpool/defaults.json
MIN_DYN_DEVFS_RULESET = 1000