mount.go 348 B

123456789101112131415161718
  1. package aufs
  2. import (
  3. "os/exec"
  4. "syscall"
  5. log "github.com/Sirupsen/logrus"
  6. )
  7. func Unmount(target string) error {
  8. if err := exec.Command("auplink", target, "flush").Run(); err != nil {
  9. log.Errorf("[warning]: couldn't run auplink before unmount: %s", err)
  10. }
  11. if err := syscall.Unmount(target, 0); err != nil {
  12. return err
  13. }
  14. return nil
  15. }