Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1a99953aa2 | ||
|
e2f4e6254f |
@@ -95,13 +95,16 @@ func (b *BootDeploy) Run() error {
|
||||
}
|
||||
|
||||
func getKernelPath(outDir string, zboot bool) ([]string, error) {
|
||||
kernFile := "vmlinuz*"
|
||||
|
||||
var kernels []string
|
||||
if zboot {
|
||||
kernFile = "linux.efi"
|
||||
kernels, _ = filepath.Glob(filepath.Join(outDir, "linux.efi"))
|
||||
if len(kernels) > 0 {
|
||||
return kernels, nil
|
||||
}
|
||||
// else fallback to vmlinuz* below
|
||||
}
|
||||
|
||||
var kernels []string
|
||||
kernFile := "vmlinuz*"
|
||||
kernels, _ = filepath.Glob(filepath.Join(outDir, kernFile))
|
||||
if len(kernels) == 0 {
|
||||
return nil, errors.New("Unable to find any kernels at " + filepath.Join(outDir, kernFile))
|
||||
|
@@ -118,7 +118,9 @@ func getModulesInDir(modPath string) (files []string, err error) {
|
||||
// Unable to walk path
|
||||
return err
|
||||
}
|
||||
if filepath.Ext(path) != ".ko" && filepath.Ext(path) != ".xz" {
|
||||
// this assumes module names are in the format <name>.ko[.format],
|
||||
// where ".format" (e.g. ".gz") is optional.
|
||||
if !strings.Contains(".ko", path) {
|
||||
return nil
|
||||
}
|
||||
files = append(files, path)
|
||||
|
Reference in New Issue
Block a user