Am 17.05.2011 um 19:04 schrieb Swartz, Patrick H:
Hardware team notifies the Linux team and says, "the server is ready for you, the public network in on the second port and you need to use this IP '10.100.10.1", and the Netbackup network is on the third port and you need to use this IP '172.27.100.1'."
okay, so you have two static interfaces. Let's put those two into your XML file: <interfaces config:type="list"> <!-- 1st interface, use "0" in the ask path to point to this --> <interface> <bootproto>static</bootproto> <device>eth0</device> <!-- ask for networking,interfaces,0,ipaddr --> <ipaddr>_ask_</ipaddr> <!-- ask for networking,interfaces,0,netmask --> <netmask>_ask_</netmask> <startmode>auto</startmode> <usercontrol>no</usercontrol> </interface> <!-- 2nd interface, use "1" in the ask path to point to this --> <interface> <bootproto>static</bootproto> <device>eth1</device> <!-- ask for networking,interfaces,1,ipaddr --> <ipaddr>_ask_</ipaddr> <!-- ask for networking,interfaces,1,netmask --> <netmask>_ask_</netmask> <startmode>auto</startmode> <usercontrol>no</usercontrol> </interface> </interfaces> I have put comments with the <ask> path into the XML, in case you want to ask for those values. "interfaces" is a list of NICs. The number in the path points to the number in the list, starting from 0. So if you want to manipulate the first interface in the <interfaces> list, use 0 in the <path>. Use 1 for the second, 2 for the third and so on
So, I am thinking that an autoinst.xml file that would prompt the admin team for the MAC address of the public-facing network interface and the
if you want to ask for a mac address for eth0, do it like this: <networking> <net-udev config:type="list"> <rule> <name>eth0</name> <rule>ATTR{address}</rule> <value>_ask_</value> </rule> <rule> <name>eth1</name> <rule>ATTR{address}</rule> <!-- example <value>00:50:51:bb:51:6f</value> --> <value>_ask_</value> </rule> </net-udev> ... <interfaces config:type="list"> ... </interfaces> ... </networking> and use a question with a path like this: <path>networking,net-udev,0,value</path> For the second interface: <path>networking,net-udev,1,value</path> as you can see, the number is totally independent from the hardware. It points only to the number in the list in the XML file. I know there is one confusing point in this. Where is the <rule> in the path? Well, a config:tyoe="list" in autoyast can contain the same data structure multiple times. Like multiple <rule> or <interface> definitions. Autoyast does not care on how you name those in the list. Autoyast will not even know how you named them because for AY it's only important that a list of data structures will come now and so it's only interested in the index-number in that list but not in the name you gave it. I know it's a bit confusing at the beginning.
My question about understanding the <path> statement was so that I could possibly use that in building the xml file. For example in this statement -- <path>networking,interfaces,4,ipaddr</path> -- does the "4" represent the actual interface?
the 4 would manipulate the 5th interface in the XML file: <networking> <interfaces config:type="list"> <interface> ... first </interface> <interface> ... second </interface> <interface> ... third </interface> <interface> ... fourth </interface> <interface> <!-- the path points to this interface --> </interface> </interfaces> ... </networking> that's not eth5. It can be eth0 at the end. The number in the path describes only the position in the XML Imagine the path as a tool to manipulate the XML file. Not a tool to manipulate interfaces, rules, users, ....
If so, how do I determine how this is calculated? Does it start at 0 or 1, does it read the on-board
it starts with 0 but it's not calculated. It's just counted. I hope I could shed some light into it. ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org