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 ( const (
gVersion = "0.38" gVersion = "0.38a"
// TODO : Get from $jail_zpool/defaults.json // TODO : Get from $jail_zpool/defaults.json
MIN_DYN_DEVFS_RULESET = 1000 MIN_DYN_DEVFS_RULESET = 1000

View File

@ -5,6 +5,7 @@ import (
"fmt" "fmt"
//"log" //"log"
"time" "time"
"strings"
) )
@ -63,6 +64,12 @@ func UpdateJail(args []string) {
continue 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) fmt.Printf(" > Snapshot jail %s\n", cj.Name)
// Set snapshot name // Set snapshot name
dt := time.Now() dt := time.Now()