jasonc / puppet-ovirt

A Puppet module to easily install oVirt engine and oVirt node.
http://forge.puppetlabs.com/jcannon/ovirt
7 stars 23 forks source link

A few issues #2

Open myoung34 opened 9 years ago

myoung34 commented 9 years ago
myoung34 commented 9 years ago

etc/sysconfig/network-scripts/ifcfg-ovirtmgmt can be created with:

Device=eth0
cd /etc/sysconfig/network-scripts
if [ ! -f ifcfg-ovirtmgmt ]; then
  cp -p ifcfg-$Device bu-ifcfg-$Device
  echo -e "DEVICE=$Device\nBOOTPROTO=none\nNM_CONTROLLED=no\nONBOOT=yes\nBRIDGE=ovirtmgmt" > ifcfg-$Device
  grep ^HW bu-ifcfg-$Device >> ifcfg-$Device
  echo -e "DEVICE=ovirtmgmt\nNM_CONTROLLED=no\nONBOOT=yes\nTYPE=bridge" > ifcfg-ovirtmgmt
  egrep -v "^#|^DEV|^HWA|^TYP|^UUI|^NM_|^ONB" bu-ifcfg-$Device >> ifcfg-ovirtmgmt
  service network restart
fi