[elbe-devel] [PATCH v3 50/52] Fix style in rfs.py

Torben Hohn torben.hohn at linutronix.de
Fri Jul 5 13:31:07 CEST 2019


On Thu, Jun 27, 2019 at 02:45:04PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

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

> ---
>  elbepack/rfs.py | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 3d35e29c..85084de5 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -268,9 +268,9 @@ class BuildEnv (object):
>          preseed_txt = preseed_to_text(preseed)
>          self.rfs.write_file("var/cache/elbe/preseed.txt", 0o644, preseed_txt)
>          with self.rfs:
> -            chroot(
> -                self.rfs.path, 'debconf-set-selections < %s' %
> -                self.rfs.fname("var/cache/elbe/preseed.txt"))
> +            cmd = ('debconf-set-selections < %s' %
> +                   self.rfs.fname("var/cache/elbe/preseed.txt"))
> +            chroot(self.rfs.path, cmd)
>  
>      def create_apt_prefs(self):
>  
> @@ -311,9 +311,8 @@ class BuildEnv (object):
>  
>      def seed_etc(self):
>          passwd = self.xml.text("target/passwd")
> -        chroot(
> -            self.rfs.path, """/bin/sh -c 'echo "%s\\n%s\\n" | passwd'""" %
> -            (passwd, passwd))
> +        stdin = "%s\n%s\n" % (passwd, passwd)
> +        chroot(self.rfs.path, "passwd", stdin=stdin)
>  
>          hostname = self.xml.text("target/hostname")
>          fqdn = hostname
> -- 
> 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