1
0
mirror of https://github.com/rancher/os.git synced 2025-09-17 15:40:47 +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

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 {