Merge pull request #4656 from crosbymichael/fix-ptmx-link

Always symlink /dev/ptmx for libcontainer
This commit is contained in:
Michael Crosby 2014-03-13 14:57:17 -07:00
commit d083dad06a
1 changed files with 6 additions and 6 deletions

View File

@ -64,11 +64,9 @@ func setupNewMountNamespace(rootfs string, bindMounts []libcontainer.Mount, cons
if err := setupDev(rootfs); err != nil {
return err
}
if console != "" {
if err := setupPtmx(rootfs, console); err != nil {
return err
}
}
if err := system.Chdir(rootfs); err != nil {
return fmt.Errorf("chdir into %s %s", rootfs, err)
}
@ -263,9 +261,11 @@ func setupPtmx(rootfs, console string) error {
if err := os.Symlink("pts/ptmx", ptmx); err != nil {
return fmt.Errorf("symlink dev ptmx %s", err)
}
if console != "" {
if err := setupConsole(rootfs, console); err != nil {
return err
}
}
return nil
}