[PATCH rhel7-branch] network: copy resolv.conf to chroot before installing packages (#1048520)

Vratislav Podzimek vpodzime at redhat.com
Thu Aug 28 09:58:11 UTC 2014


On Thu, 2014-08-28 at 11:54 +0200, Radek Vykydal wrote:
> Resolves: rhbz#1048520
> 
> So name resolution works in rpm scripts.
> ---
>  pyanaconda/install.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/pyanaconda/install.py b/pyanaconda/install.py
> index c73ba68..b775c62 100644
> --- a/pyanaconda/install.py
> +++ b/pyanaconda/install.py
> @@ -27,6 +27,7 @@ from pyanaconda.users import createLuserConf, getPassAlgo, Users
>  from pyanaconda import flags
>  from pyanaconda import iutil
>  from pyanaconda import timezone
> +from pyanaconda import network
>  from pyanaconda.i18n import _
>  from pyanaconda.threads import threadMgr
>  import logging
> @@ -171,6 +172,10 @@ def doInstall(storage, payload, ksdata, instClass):
>          with progress_report(_("Discovering realm to join")):
>              ksdata.realm.setup()
>  
> +    # make name resolution work for rpm scripts in chroot
> +    if flags.can_touch_runtime_system("copy /etc/resolv.conf to sysroot"):
> +        network.copyFileToPath("/etc/resolv.conf", iutil.getSysroot())
> +
>      # anaconda requires storage packages in order to make sure the target
>      # system is bootable and configurable, and some other packages in order
>      # to finish setting up the system.
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic




More information about the anaconda-patches mailing list