change sysctl call to use absolute path

Fixes: #6804
This commit is contained in:
John Eikenberry 2019-11-15 14:28:13 -08:00
parent a30fac8a89
commit 829c330a64
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ const ephemeralPortRangeSysctlKey = "net.ipv4.ip_local_port_range"
var ephemeralPortRangePatt = regexp.MustCompile(`^\s*(\d+)\s+(\d+)\s*$`)
func getEphemeralPortRange() (int, int, error) {
cmd := exec.Command("sysctl", "-n", ephemeralPortRangeSysctlKey)
cmd := exec.Command("/sbin/sysctl", "-n", ephemeralPortRangeSysctlKey)
out, err := cmd.Output()
if err != nil {
return 0, 0, err