[PATCH] Create empty /etc/sysconfig/network for network service (#957897)

Vratislav Podzimek vpodzime at redhat.com
Fri May 17 13:31:21 UTC 2013


On Fri, 2013-05-17 at 15:25 +0200, Radek Vykydal wrote:
> ---
>  pyanaconda/network.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/pyanaconda/network.py b/pyanaconda/network.py
> index 6f73143..6532e6e 100644
> --- a/pyanaconda/network.py
> +++ b/pyanaconda/network.py
> @@ -750,9 +750,20 @@ def usedByRootOnISCSI(iface, storage):
>  
>      return False
>  
> +def write_sysconfig_network(rootpath, overwrite=False):
> +
> +    cfgfile = os.path.normpath(rootpath + networkConfFile)
> +    if (os.path.isfile(cfgfile) and not overwrite):
> +        return False
> +
> +    with open(cfgfile, "w") as f:
> +        f.write("# Created by anaconda\n")
> +    return True
> +
>  def write_network_config(storage, ksdata, instClass, rootpath):
>      write_hostname(rootpath, ksdata, overwrite=flags.livecdInstall)
>      set_hostname(ksdata.network.hostname)
> +    write_sysconfig_network(rootpath, overwrite=flags.livecdInstall)
>      disableIPV6(rootpath)
>      if not flags.imageInstall:
>          copyIfcfgFiles(rootpath)
Too bad we have to resolve bugs in other tools with our code. ACK.

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list