How to detect the number of network adapters installed from kickstart file for network config?

Pat patchu1 at yahoo.com
Sat Feb 19 01:37:46 UTC 2011


My kickstart file is usually used on systems with 1 or 2 network interfaces installed. If my kickstart file has the following lines:

network --device eth0 --bootproto dhcp
network --device eth1 --onboot no --bootproto dhcp


It will fail if I use it on a system with only 1 network interface since eth1 doesn't exist. 

>From a kicksstart file how do I detect the number of network interfaces installed on the system and then only assign eth1 as above if that number is 2 or more? If it matters, it's possible the network interfaces are not plugged into the network when the kickstart is run. Thanks.


      




More information about the Kickstart-list mailing list