1
0
mirror of https://github.com/rancher/os.git synced 2025-07-17 08:31:02 +00:00

Merge pull request #2305 from JacieChao/master

Add parameters while loading kernel modules
This commit is contained in:
niusmallnan 2018-03-27 15:01:16 +08:00 committed by GitHub
commit fc8ef7d98d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,9 @@ func loadModules(cfg *config.CloudConfig) (*config.CloudConfig, error) {
}
log.Debugf("Loading module %s", module)
cmd := exec.Command("modprobe", module)
// split module and module parameters
cmdParam := strings.SplitN(module, " ", -1)
cmd := exec.Command("modprobe", cmdParam...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {