File: config_freebsd.go

package info (click to toggle)
golang-github-containers-common 0.50.1%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,440 kB
  • sloc: makefile: 118; sh: 46
file content (17 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//go:build freebsd
// +build freebsd

package cni

import (
	"os/exec"

	"github.com/sirupsen/logrus"
)

func deleteLink(name string) {
	if output, err := exec.Command("ifconfig", name, "destroy").CombinedOutput(); err != nil {
		// only log the error, it is not fatal
		logrus.Infof("Failed to remove network interface %s: %v: %s", name, err, output)
	}
}