xCAT recommends to use 'confignics' postscripts to achieve that. Refer to the doc: http://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network_adapter.html
 

Thanks
Best Regards
----------------------------------------------------------------------
Wang Xiaopeng (王晓朋)
IBM China System Technology Laboratory
Tel: 86-10-82453455
Email: w...@cn.ibm.com
Address: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road, Haidian District Beijing P.R.China 100193
 
 
----- Original message -----
From: Josh Nielsen <jniel...@hudsonalpha.org>
To: xCAT Users Mailing list <xcat-user@lists.sourceforge.net>
Cc:
Subject: [xcat-user] Is there an ifcfg-eth postscript that works on systemd OSes?
Date: Thu, Aug 4, 2016 4:24 AM
 
Hello,

I am now testing the deployment of Centos 7 in my environment and I've noticed that the ifcfg-eth postscript is not geared to work with it. For starters Centos 7 doesn't install ifconfig by default, though I've solved that with my kickstart, but more to the point the postscript explicitly looks for "Ethernet" in the ifconfig line to grab the interface name which doesn't work on systemd OSes like Centos 7. And of course there's the change from "eth" interface names to "ens" and a variety of other names.

I changed the line that looked like this in the postscript:

interfaces=$(ifconfig -a | grep "Ethernet" | awk '{print $1}')
 
To this:

interfaces=$(ifconfig -a | egrep "Ethernet|ens" | awk '{print $1}')

And while that does parse out the ens interface names now they come with a colon tacked on to the end of them in the ifconfig output like this:
ens160:
ens192:

I can parse that out with a regex substitution to remove the colon, but before I hack the default script up too much has there been an alternative ifcfg-eth postscript released for systems like this? I'm using this script to change the /etc/sysconfig/network-scripts/ifcfg-* files from using DHCP to the static addresses defined through xCAT, which works fine on my Centos 6 OSes.

This is my xCAT version:
lsxcatd -v
Version 2.11 (git commit 9ea36ca6163392bf9ab684830217f017193815be, built Mon Nov 30 05:43:11 EST 2015)

Thanks,
Josh Nielsen

 
------------------------------------------------------------------------------
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user
 

------------------------------------------------------------------------------
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to