summaryrefslogtreecommitdiff
path: root/vmdebootstrap
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-11-06 09:42:37 +0000
committerNeil Williams <codehelp@debian.org>2015-11-06 09:42:37 +0000
commitddc0a195327c8c52e3c758007d66e237e8abaf38 (patch)
treed91f48b79dd115963b44a61ddf6fd10170302fbc /vmdebootstrap
parenta2e6092693643acd2b7f12d8dde9b23fb9ba4f97 (diff)
downloadvmdebootstrap-ddc0a195327c8c52e3c758007d66e237e8abaf38.tar.gz
Add support for mounting and umounting /dev/pts/
Diffstat (limited to 'vmdebootstrap')
-rw-r--r--vmdebootstrap/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/vmdebootstrap/base.py b/vmdebootstrap/base.py
index 899bec1..4ce5236 100644
--- a/vmdebootstrap/base.py
+++ b/vmdebootstrap/base.py
@@ -49,6 +49,8 @@ def runcmd(argv, stdin='', ignore_fail=False, env=None, **kwargs):
def mount_wrapper(rootdir):
runcmd(['mount', '/dev', '-t', 'devfs', '-obind',
'%s' % os.path.join(rootdir, 'dev')])
+ runcmd(['mount', '/dev/pts', '-t', 'devpts', '-obind',
+ '%s' % os.path.join(rootdir, 'dev', 'pts')])
runcmd(['mount', '/proc', '-t', 'proc', '-obind',
'%s' % os.path.join(rootdir, 'proc')])
runcmd(['mount', '/sys', '-t', 'sysfs', '-obind',
@@ -58,6 +60,7 @@ def mount_wrapper(rootdir):
def umount_wrapper(rootdir):
runcmd(['umount', os.path.join(rootdir, 'sys')])
runcmd(['umount', os.path.join(rootdir, 'proc')])
+ runcmd(['umount', os.path.join(rootdir, 'dev', 'pts')])
runcmd(['umount', os.path.join(rootdir, 'dev')])