Skip to content

Commit

Permalink
Correctly check error message from sysctl (#275)
Browse files Browse the repository at this point in the history
Signed-off-by: Marius Sincovici <[email protected]>
  • Loading branch information
mariusSincovici authored Feb 14, 2024
1 parent 849b17a commit bb8b01a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sysctl_setter.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *SysctlSetterImpl) Exists() bool {
}

if _, err := Parameter(s.paramName); err != nil {
return strings.Contains(err.Error(), "cannot stat")
return !strings.Contains(err.Error(), "cannot stat")
}

return true
Expand Down

0 comments on commit bb8b01a

Please sign in to comment.