summaryrefslogtreecommitdiff
path: root/pkg/netns/netns_linux.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-01-07 05:37:24 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-01-07 05:37:24 -0500
commitd9ebbbfe5b6a22e61091fe764ae2875aa0bf8064 (patch)
tree525e61c3bef7d9c3c3d93e2532edab937ac7e593 /pkg/netns/netns_linux.go
parent68c9e02df72cbdfb2d239fb1de020bc1e0dabad3 (diff)
downloadpodman-d9ebbbfe5b6a22e61091fe764ae2875aa0bf8064.tar.gz
podman-d9ebbbfe5b6a22e61091fe764ae2875aa0bf8064.tar.bz2
podman-d9ebbbfe5b6a22e61091fe764ae2875aa0bf8064.zip
Switch references of /var/run -> /run
Systemd is now complaining or mentioning /var/run as a legacy directory. It has been many years where /var/run is a symlink to /run on all most distributions, make the change to the default. Partial fix for https://github.com/containers/podman/issues/8369 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/netns/netns_linux.go')
-rw-r--r--pkg/netns/netns_linux.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/netns/netns_linux.go b/pkg/netns/netns_linux.go
index ed5241632..6817a3abd 100644
--- a/pkg/netns/netns_linux.go
+++ b/pkg/netns/netns_linux.go
@@ -45,7 +45,7 @@ func getNSRunDir() (string, error) {
}
return filepath.Join(rootlessDir, "netns"), nil
}
- return "/var/run/netns", nil
+ return "/run/netns", nil
}
// NewNS creates a new persistent (bind-mounted) network namespace and returns
@@ -80,7 +80,7 @@ func NewNS() (ns.NetNS, error) {
return nil, fmt.Errorf("mount --make-rshared %s failed: %q", nsRunDir, err)
}
- // Recursively remount /var/run/netns on itself. The recursive flag is
+ // Recursively remount /run/netns on itself. The recursive flag is
// so that any existing netns bindmounts are carried over.
err = unix.Mount(nsRunDir, nsRunDir, "none", unix.MS_BIND|unix.MS_REC, "")
if err != nil {