mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-11-14 23:51:05 +00:00
Output kernel command line to a file in the kernel+initrd output case
Trying to find the relevant yaml file was an issue as we now support `--name` and it might be in a different directory, so although it is a bit verbose outputing a whole file at least it is more consistent. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
11
main.go
11
main.go
@@ -223,13 +223,11 @@ func build(m *Moby, name string) {
|
||||
}
|
||||
|
||||
var (
|
||||
conf string
|
||||
cmdline bool
|
||||
name string
|
||||
conf string
|
||||
name string
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.BoolVar(&cmdline, "cmdline", false, "Print the kernel command line and exit")
|
||||
flag.StringVar(&name, "name", "", "Name to use for output files")
|
||||
flag.Parse()
|
||||
|
||||
@@ -256,10 +254,5 @@ func main() {
|
||||
log.Fatalf("Invalid config: %v", err)
|
||||
}
|
||||
|
||||
if cmdline {
|
||||
fmt.Printf("%s\n", m.Kernel.Cmdline)
|
||||
return
|
||||
}
|
||||
|
||||
build(m, name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user