mount.go 362 B

123456789101112131415161718
  1. // +build linux
  2. package aufs
  3. import (
  4. "os/exec"
  5. "github.com/sirupsen/logrus"
  6. "golang.org/x/sys/unix"
  7. )
  8. // Unmount the target specified.
  9. func Unmount(target string) error {
  10. if err := exec.Command("auplink", target, "flush").Run(); err != nil {
  11. logrus.Warnf("Couldn't run auplink before unmount %s: %s", target, err)
  12. }
  13. return unix.Unmount(target, 0)
  14. }