mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
7c62cee51e
Fixed #8761 Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
18 lines
348 B
Go
18 lines
348 B
Go
package aufs
|
|
|
|
import (
|
|
"os/exec"
|
|
"syscall"
|
|
|
|
log "github.com/Sirupsen/logrus"
|
|
)
|
|
|
|
func Unmount(target string) error {
|
|
if err := exec.Command("auplink", target, "flush").Run(); err != nil {
|
|
log.Errorf("[warning]: couldn't run auplink before unmount: %s", err)
|
|
}
|
|
if err := syscall.Unmount(target, 0); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|