MCPcopy Create free account
hub / github.com/containers/common / getDefaultNetavarkConfigDir

Function getDefaultNetavarkConfigDir

libnetwork/network/interface.go:198–203  ·  view source on GitHub ↗

getDefaultNetavarkConfigDir return the netavark config dir. For rootful it will use "/etc/containers/networks" and for rootless "$graphroot/networks". We cannot use the graphroot for rootful since the network namespace is shared for all libpod instances.

(store storage.Store)

Source from the content-addressed store, hash-verified

196// use the graphroot for rootful since the network namespace is shared for all
197// libpod instances.
198func getDefaultNetavarkConfigDir(store storage.Store) string {
199 if !unshare.IsRootless() {
200 return netavarkConfigDir
201 }
202 return filepath.Join(store.GraphRoot(), "networks")
203}

Callers 1

NetworkBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…