summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGui Chen <gui.chen@intel.com>2013-05-15 08:11:36 -0400
committerGui Chen <gui.chen@intel.com>2013-05-15 08:11:36 -0400
commit8c82a864c00bc0eabed062588a3a86fb2ee67506 (patch)
treefadfd6e457a17622392fb99f56952daf39d2dccf
parente9271cec9023144e8d1634d64b3389e435f35bef (diff)
downloadmic-8c82a864c00bc0eabed062588a3a86fb2ee67506.tar.gz
mic-8c82a864c00bc0eabed062588a3a86fb2ee67506.tar.bz2
mic-8c82a864c00bc0eabed062588a3a86fb2ee67506.zip
fix relative symbolic link in bind mount
Signed-off-by: Gui Chen <gui.chen@intel.com>
-rw-r--r--mic/utils/fs_related.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mic/utils/fs_related.py b/mic/utils/fs_related.py
index 86f947b..817a016 100644
--- a/mic/utils/fs_related.py
+++ b/mic/utils/fs_related.py
@@ -113,6 +113,8 @@ class BindChrootMount:
self.orig_src = self.src = src
if os.path.islink(src):
self.src = os.readlink(src)
+ if not self.src.startswith('/'):
+ self.src = os.path.abspath(os.path.join(src, self.src))
if not dest:
dest = self.src