Skip to content

Commit b0119fb

Browse files
committed
update: fix msg output, go vet (2)
1 parent 7e3db7c commit b0119fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ipvs/netlink.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ func setup() {
6666
ipvsOnce.Do(func() {
6767
var err error
6868
if out, err := exec.Command("modprobe", "-va", "ip_vs").CombinedOutput(); err != nil {
69-
fmt.Fprintf(os.Stderr, "Running modprobe ip_vs failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
70-
os.Exit(1)
69+
if os.Getenv("SKIP_IPVSKERNELREQ") != "1" {
70+
fmt.Fprintf(os.Stderr, "Running modprobe ip_vs failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
71+
os.Exit(1)
72+
}
7173
}
7274

7375
ipvsFamily, err = getIPVSFamily()

0 commit comments

Comments
 (0)