diff options
author | Clark Williams <williams@redhat.com> | 2010-07-16 09:42:21 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2010-07-27 13:59:23 -0500 |
commit | a910c06304056c864380a7cb6ce7ce65b5fed3b9 (patch) | |
tree | 326ecfdbc7035f33de1c6823fde22bb980bbf98a | |
parent | 447cf0257b48367b23df385afc7c6504afbd4060 (diff) | |
download | mock-a910c06304056c864380a7cb6ce7ce65b5fed3b9.tar.gz mock-a910c06304056c864380a7cb6ce7ce65b5fed3b9.tar.xz mock-a910c06304056c864380a7cb6ce7ce65b5fed3b9.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")) |