[elbe-devel] [PATCH v1 8/8] Check with 'lexist' for "/rfs/etc"

Torben Hohn torben.hohn at linutronix.de
Thu May 23 17:20:32 CEST 2019


On Wed, May 22, 2019 at 03:33:48PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Not sure if that makes sens.  Never saw a system with "/etc"
> as a symlink.

on an ro system, this might be a link to an rw partition.
although this would generally happen on a file by file 
basis. 



> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/efilesystem.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
> index 3422b6fc..42e3d555 100644
> --- a/elbepack/efilesystem.py
> +++ b/elbepack/efilesystem.py
> @@ -298,8 +298,8 @@ class TargetFs(ChRootFilesystem):
>          self.image_packers = {}
>  
>      def write_fstab(self, xml):
> -        if not self.exists("etc"):
> -            self.mkdir("etc")
> +        if not self.lexists("etc"):
> +            self.mkdir(self.realpath("etc"))
>  
>          f = self.open("etc/fstab", "w")
>          if xml.tgt.has("fstab"):
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list