mirror of
https://github.com/rancher/os.git
synced 2025-08-08 10:08:04 +00:00
use new os-base with dhcpcd
This commit is contained in:
parent
d67aec9122
commit
7cc2eb316c
@ -116,7 +116,7 @@ func ApplyNetworkConfigs(netCfg *config.NetworkConfig) error {
|
|||||||
func applyNetConf(link netlink.Link, netConf config.InterfaceConfig) error {
|
func applyNetConf(link netlink.Link, netConf config.InterfaceConfig) error {
|
||||||
if netConf.DHCP {
|
if netConf.DHCP {
|
||||||
log.Infof("Running DHCP on %s", link.Attrs().Name)
|
log.Infof("Running DHCP on %s", link.Attrs().Name)
|
||||||
cmd := exec.Command("udhcpc", "-i", link.Attrs().Name, "-t", "20", "-n")
|
cmd := exec.Command("dhcpcd", link.Attrs().Name)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
|
@ -211,9 +211,7 @@ func NewConfig() *Config {
|
|||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
Image: "network",
|
Image: "network",
|
||||||
CapAdd: []string{
|
Privileged: true,
|
||||||
"NET_ADMIN",
|
|
||||||
},
|
|
||||||
Net: "host",
|
Net: "host",
|
||||||
Labels: []string{
|
Labels: []string{
|
||||||
DETACH + "=false",
|
DETACH + "=false",
|
||||||
|
Loading…
Reference in New Issue
Block a user