v0.38a: Block update to basejail, and redirect to template

This commit is contained in:
yo 2023-08-06 18:49:23 +02:00
parent c55262690a
commit ed5f8f0b1c
2 changed files with 9 additions and 2 deletions

View File

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

View File

@ -5,6 +5,7 @@ import (
"fmt"
//"log"
"time"
"strings"
)
@ -62,7 +63,13 @@ func UpdateJail(args []string) {
fmt.Printf("Error getting jail: %s\n", err)
continue
}
// We cant update basejail as system is readonly
if strings.EqualFold(cj.Config.Jailtype, "basejail") {
fmt.Printf("%s is a basejail using %s system files. Please update %s!\n", cj.Name, cj.Config.Origin, cj.Config.Origin)
continue
}
fmt.Printf(" > Snapshot jail %s\n", cj.Name)
// Set snapshot name
dt := time.Now()