1
0
forked from rosa/hakurei

cmd/mbf: optional init verbosity

This output is generally not needed and only useful when debugging container machinery itself.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-05 21:33:27 +09:00
parent 1f0bdc7aca
commit 15cdb37ec2
2 changed files with 9 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ type cache struct {
cures, jobs int
hostAbstract, idle bool
verboseInit bool
base string
}
@@ -45,6 +46,9 @@ func (cache *cache) open() (err error) {
if cache.hostAbstract {
flags |= pkg.CHostAbstract
}
if !cache.verboseInit {
flags |= pkg.CSuppressInit
}
done := make(chan struct{})
defer close(done)

View File

@@ -108,6 +108,10 @@ func main() {
&flagCheck,
"check", command.BoolFlag(true),
"Run test suites",
).Flag(
&cm.verboseInit,
"v", command.BoolFlag(false),
"Do not suppress verbose output from init",
).Flag(
&cm.cures,
"cures", command.IntFlag(0),
@@ -710,6 +714,7 @@ func main() {
z.Hostname = "localhost"
z.Uid, z.Gid = (1<<10)-1, (1<<10)-1
z.Stdin, z.Stdout, z.Stderr = os.Stdin, os.Stdout, os.Stderr
z.Quiet = !cm.verboseInit
if s, ok := os.LookupEnv("TERM"); ok {
z.Env = append(z.Env, "TERM="+s)
}