Add /etc/hosts to the chroot environment 39/75239/1
authorPetr Ospalý <p.ospaly@partner.samsung.com>
Thu, 3 Jan 2019 18:03:45 +0000 (19:03 +0100)
committerPetr Ospalý <p.ospaly@partner.samsung.com>
Thu, 3 Jan 2019 18:25:38 +0000 (19:25 +0100)
This will change in a future commit to be little more flexible.
As of now it fixes some usage when host system has defined
some custom resolving which are needed.

Change-Id: Ifea2ba087982006c0a399d1b225d7ab13f7e94da
Issue-ID: OOM-1551
Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
ansible/docker/run_chroot.sh

index b38c129..1ab2637 100755 (executable)
@@ -448,8 +448,9 @@ case "$action" in
         install_wrapper
 
         # execute chroot
-        # copy resolv.conf
+        # copy resolv.conf and hosts file
         cp -a /etc/resolv.conf "$CHROOT_DIR"/etc/resolv.conf
+        cp -a /etc/hosts "$CHROOT_DIR"/etc/hosts
 
         if [ -n "$1" ] ; then
             :