mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
Add dhcp timeout parameter
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
@@ -290,6 +291,10 @@ func runDhcp(netCfg *NetworkConfig, iface string, argstr string, setHostname, se
|
||||
args = append(args, "--nohook", "resolv.conf")
|
||||
}
|
||||
|
||||
if netCfg.DHCPTimeout > 0 {
|
||||
args = append(args, "--timeout", strconv.Itoa(netCfg.DHCPTimeout))
|
||||
}
|
||||
|
||||
// Wait for lease
|
||||
// TODO: this should be optional - based on kernel arg?
|
||||
args = append(args, "-w", "--debug")
|
||||
|
Reference in New Issue
Block a user