better handling of version/patch especiallly for snapshots, use updateWorkDir

This commit is contained in:
yo
2024-10-19 09:57:36 +02:00
parent fb4010378f
commit 6acea0d25b
5 changed files with 62 additions and 40 deletions

View File

@@ -14,7 +14,7 @@ import (
)
const (
gVersion = "0.42d"
gVersion = "0.42g"
// TODO : Get from $jail_zpool/defaults.json
MIN_DYN_DEVFS_RULESET = 1000
@@ -99,7 +99,11 @@ It support iocage jails and can coexist with iocage.`,
Long: `Let this show you how much fail I had to get this *cough* perfect`,
Run: func(cmd *cobra.Command, args []string) {
fv, _ := getFreeBSDVersion()
fmt.Printf("GoCage v.%s on FreeBSD %d.%d-%s\n", gVersion, fv.major, fv.minor, fv.flavor)
if fv.patchLevel > 0 {
fmt.Printf("GoCage v.%s on FreeBSD %d.%d-%s-p%d\n", gVersion, fv.major, fv.minor, fv.flavor, fv.patchLevel)
} else {
fmt.Printf("GoCage v.%s on FreeBSD %d.%d-%s\n", gVersion, fv.major, fv.minor, fv.flavor)
}
},
}