getInitfsModules: don't fail if kernel modules dir does not exist
This directory doesn't exist all the time, e.g. if the kernel was built without modules or no modules were installed for some reason. Assume the kernel package knows what it is doing and just print a message that might be helpful if the kernel package ends up not knowing what it is doing.
This commit is contained in:
4
main.go
4
main.go
@@ -444,7 +444,9 @@ func getInitfsModules(files misc.StringSet, devinfo deviceinfo.DeviceInfo, kerne
|
||||
|
||||
modDir := filepath.Join("/lib/modules", kernelVer)
|
||||
if !exists(modDir) {
|
||||
return errors.New("Kernel module directory not found: " + modDir)
|
||||
// dir /lib/modules/<kernel> if kernel built without module support, so just print a message
|
||||
log.Printf("-- kernel module directory not found: %q, not including modules", modDir)
|
||||
return nil
|
||||
}
|
||||
|
||||
// modules.* required by modprobe
|
||||
|
Reference in New Issue
Block a user