[elbe-devel] [PATCH v2 8/8] Check if '/rfs/etc' is a link and use realpath

dion at linutronix.de dion at linutronix.de
Tue May 28 12:06:06 CEST 2019


From: Olivier Dion <dion at linutronix.de>

Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hogn at linutronix.de>
---
 elbepack/efilesystem.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
index 9181c89d..82e8a5a4 100644
--- a/elbepack/efilesystem.py
+++ b/elbepack/efilesystem.py
@@ -325,7 +325,10 @@ class TargetFs(ChRootFilesystem):
 
     def write_fstab(self, xml):
         if not self.exists("etc"):
-            self.mkdir("etc")
+            if self.islink("etc"):
+                self.mkdir(self.realpath("etc"))
+            else:
+                self.mkdir("etc")
 
         f = self.open("etc/fstab", "w")
         if xml.tgt.has("fstab"):
-- 
2.11.0




More information about the elbe-devel mailing list