Skip to content

Commit

Permalink
don't call dhclient -x on network setup (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
hopkiw committed Sep 28, 2020
1 parent bf82f7c commit 3a6ad54
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions google_guest_agent/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func configureIPv6() error {
return nil
}

// enableNetworkInterfaces runs `dhclient -x; dhclient eth1 eth2 ... ethN`.
// enableNetworkInterfaces runs `dhclient eth1 eth2 ... ethN`.
// On RHEL7, it also calls disableNM for each interface.
// On SLES, it calls enableSLESInterfaces instead of dhclient.
func enableNetworkInterfaces() error {
Expand Down Expand Up @@ -517,10 +517,6 @@ func enableNetworkInterfaces() error {
return runCmd(exec.Command(dhcpCommand))
}

err := runCmd(exec.Command("dhclient", "-x"))
if err != nil {
logger.Warningf("Error running 'dhclient -x': %v.", err)
}
dhclientArgs := []string{}
// The dhclient_script key has historically only been supported on EL6.
if (osRelease.os == "rhel" || osRelease.os == "centos") && osRelease.version.major == 6 {
Expand Down

0 comments on commit 3a6ad54

Please sign in to comment.