diff options
author | Clark Williams <williams@redhat.com> | 2010-07-16 09:42:21 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2010-07-31 14:16:37 -0500 |
commit | ab696ab5dbea3a8feb1909961d552643738a0306 (patch) | |
tree | 9c38422839ca6676594c78d73a36a64947bd4d5c | |
parent | d0e9aa08277d937f2a668bae40168d4ae4ae07fe (diff) | |
download | mock-ab696ab5dbea3a8feb1909961d552643738a0306.tar.gz mock-ab696ab5dbea3a8feb1909961d552643738a0306.tar.xz mock-ab696ab5dbea3a8feb1909961d552643738a0306.zip |
added symlink from /proc/self/fd to /dev/fd in the chroot (BZ# 526414)
Added a symlink in the chroot from /proc/self/fd to /dev/fd. Only
do this for EPEL5+ and FC hosts since the 2.6.9 kernel for EPEL4
does not support this.
Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r-- | py/mock/backend.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mock/backend.py b/py/mock/backend.py index f8cb412..f22ac12 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -359,6 +359,10 @@ class Root(object): os.symlink("/proc/self/fd/1", self.makeChrootPath("dev/stdout")) os.symlink("/proc/self/fd/2", self.makeChrootPath("dev/stderr")) + # don't symlink for RHEL4 systems + if kver > '2.6.9': + os.symlink("/proc/self/fd", self.makeChrootPath("dev/fd")) + # symlink it for FC hosts if kver >= '2.6.19': os.symlink("/dev/pts/ptmx", self.makeChrootPath("dev/ptmx")) |