github.com/cvmfs/docker-graphdriver@v0.0.0-20181206110523-155ec6df0521/plugins/aufs_cvmfs/aufs/mount.go (about) 1 // +build linux 2 3 package aufs 4 5 import ( 6 "os/exec" 7 "syscall" 8 9 "github.com/Sirupsen/logrus" 10 ) 11 12 // Unmount the target specified. 13 func Unmount(target string) error { 14 if err := exec.Command("auplink", target, "flush").Run(); err != nil { 15 logrus.Warnf("Couldn't run auplink before unmount %s: %s", target, err) 16 } 17 if err := syscall.Unmount(target, 0); err != nil { 18 return err 19 } 20 return nil 21 }