Revert "Fix the race between configuring cbr0 and restarting static pods"
This commit is contained in:
@@ -198,20 +198,6 @@ func CompileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) {
|
||||
return regexps, nil
|
||||
}
|
||||
|
||||
// Detects if using systemd as the init system
|
||||
// Please note that simply reading /proc/1/cmdline can be misleading because
|
||||
// some installation of various init programs can automatically make /sbin/init
|
||||
// a symlink or even a renamed version of their main program.
|
||||
// TODO(dchen1107): realiably detects the init system using on the system:
|
||||
// systemd, upstart, initd, etc.
|
||||
func UsingSystemdInitSystem() bool {
|
||||
if _, err := os.Stat("/run/systemd/system"); err != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// Writes 'value' to /proc/<pid>/oom_score_adj. PID = 0 means self
|
||||
func ApplyOomScoreAdj(pid int, value int) error {
|
||||
if value < -1000 || value > 1000 {
|
||||
|
Reference in New Issue
Block a user