mirror of https://github.com/docker/docs.git
run auplink before unmounting aufs
This commit is contained in:
parent
452128f0da
commit
2f67a62b5b
5
mount.go
5
mount.go
|
@ -2,13 +2,18 @@ package docker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/dotcloud/docker/utils"
|
||||||
"os"
|
"os"
|
||||||
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Unmount(target string) error {
|
func Unmount(target string) error {
|
||||||
|
if err := exec.Command("auplink", target, "flush").Run(); err != nil {
|
||||||
|
utils.Debugf("[warning]: couldn't run auplink before unmount: %s", err)
|
||||||
|
}
|
||||||
if err := syscall.Unmount(target, 0); err != nil {
|
if err := syscall.Unmount(target, 0); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue