diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-17 15:35:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 15:35:20 -0400 |
commit | f65d9309cbe8ccbacb64fc720d99d78c14ef4139 (patch) | |
tree | 7a933ec9abfab6f7dd7dec61dd6c7550f4c0451b /libpod/diff.go | |
parent | 0a3444613e5eed3322d2b44cdc94a5ab9678768b (diff) | |
parent | b75bb4665e1c4db2bb3b931af04c099deec0f666 (diff) | |
download | podman-f65d9309cbe8ccbacb64fc720d99d78c14ef4139.tar.gz podman-f65d9309cbe8ccbacb64fc720d99d78c14ef4139.tar.bz2 podman-f65d9309cbe8ccbacb64fc720d99d78c14ef4139.zip |
Merge pull request #10270 from rhatdan/mtab
Create the /etc/mtab file if does not exists
Diffstat (limited to 'libpod/diff.go')
-rw-r--r-- | libpod/diff.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/diff.go b/libpod/diff.go index 6ce8d809a..c5a53478b 100644 --- a/libpod/diff.go +++ b/libpod/diff.go @@ -7,7 +7,7 @@ import ( "github.com/pkg/errors" ) -var containerMounts = map[string]bool{ +var initInodes = map[string]bool{ "/dev": true, "/etc/hostname": true, "/etc/hosts": true, @@ -17,6 +17,7 @@ var containerMounts = map[string]bool{ "/run/.containerenv": true, "/run/secrets": true, "/sys": true, + "/etc/mtab": true, } // GetDiff returns the differences between the two images, layers, or containers @@ -36,7 +37,7 @@ func (r *Runtime) GetDiff(from, to string) ([]archive.Change, error) { changes, err := r.store.Changes(fromLayer, toLayer) if err == nil { for _, c := range changes { - if containerMounts[c.Path] { + if initInodes[c.Path] { continue } rchanges = append(rchanges, c) |