Our
builds differ in the sense that sometimes they have one interface and other
times they have two. I’m having difficulty determining if a system
profile has one or two interfaces. If I attempt to run this code on a
system that doesn’t have an eth2 interface Cheetah errors out.
#if
$getVar($interfaces['eth2'].get('ip_address')) != ''
echo
"$interfaces['eth2'].get('ip_address','') $bkuphostname
$bkuphost" >> /etc/hosts
#end
if
I’ve
tried using $varExists, not using the $getVar and just listing the interface,
and a few other variations. Each one produces the same outcome.. Any
reference to eth2 will cause Cheetah to crash.
Does
anyone have any thoughts/ ideas on how to check what interfaces are in a system
profile? Or how to accomplish this?
Thanks.
Rob
Becker