1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 23:04:41 +00:00

Add parameters while loading kernel modules

This commit is contained in:
Jacie
2018-03-26 16:30:58 +08:00
parent b1ed273b64
commit 89ff2e2298

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 {