# yast2 xml install network configuration

**URL:** <https://forums.suse.com/t/yast2-xml-install-network-configuration/24521>\
**Category:** SLES Install-Boot\
**Created:** [September 20, 2013, 1:17pm UTC](https://forums.suse.com/t/yast2-xml-install-network-configuration/24521 "2013-09-20T13:17:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![warmup031](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@warmup031](https://forums.suse.com/u/warmup031)\
**Post date:** [September 20, 2013, 1:17pm UTC](https://forums.suse.com/t/yast2-xml-install-network-configuration/24521/1 "2013-09-20T13:17:33Z")

</div>

Hello,

I’m creating an xml file template to do automatic installation (which packages to install, security settings, network config, etc).

Only hostname/ip adress/netmask/route/domain are request via windows popups.  
After filling in all the questions, the system boots with all network informations except gateway, and the hosts file that is not filled in correctly.

Meaning in file /etc/sysconfig/network/routes, there is not the wanted ip adress, but $gateway,  
and in /etc/hosts, this is 127.0.0.2 [toto.titi.fr](http://toto.titi.fr) toto  
instdead of good ip adress (fqdn and localhosthame are ok).

in the xml file :

part contains this :  
\</hosts\_entry\>  
#set $ikeys = $interfaces.keys()  
#for $iface in $ikeys  
#set $idata = $interfaces[$iface]  
#if $idata[“interface\_type”].lower() in ["",“na”,“bridge”,“bond”]  
\<hosts\_entry\>  
\<host\_address\>$idata[“ip\_address”]\</host\_address\>  
  
$idata[“dns\_name”].lower() $my\_interface\_hostname\_short.lower()  
  
\</hosts\_entry\>

and question is like this

```
  <listentry>
	<element config:type="integer">4</element>
    <file>/tmp/gateway.txt</file>
	<pathlist config:type="list">
	<title>gateway</title>
    <path>networking,routing,routes,1,gateway</path>
	</pathlist>	
    <question>Enter default IPv4 gateway</question>
    <stage>initial</stage>
	</listentry>

```

for /etc/sysconfig/network/routes, the xml contains this :

```
  <routes config:type="list">
    <route>
      <destination>default</destination>
      <device>-</device>
      <netmask>-</netmask>
	  <gateway>$gateway</gateway>
    </route>
  </routes>

```

Can you help me to correct this ? if don’t find any documentations regarding functions/arguments/variables

Thank you
