fix adding customized public/private nics for kvm

This commit is contained in:
Edison Su 2011-01-15 03:58:29 -05:00
parent b13f5574ec
commit 72e82c8c8c
2 changed files with 4 additions and 4 deletions

View File

@ -26,8 +26,8 @@ echo CLASSPATH to run the agent: "$CLASSPATH"
export PATH=/sbin:/usr/sbin:"$PATH"
SERVICEARGS=
for x in private public ; do
configuration=`grep -q "^$x.network.device" "@AGENTSYSCONFDIR@"/agent.properties || true`
if [ -n "$CONFIGURATION" ] ; then
configuration=`grep -q "^$x.network.device" "@AGENTSYSCONFDIR@"/agent.properties`
if [ $? -eq 0 ] ; then
echo "Using manually-configured network device $CONFIGURATION"
else
defaultroute=`ip route | grep ^default | cut -d ' ' -f 5`

View File

@ -972,9 +972,9 @@ def setup_agent_config(configfile, host, zone, pod, cluster, guid, pubNic, prvNi
if prvNic == None or not device_exist(prvNic):
confopts["private.network.device"] = pubNic
if prvNic != None and device_exits(prvNic):
if prvNic != None and device_exist(prvNic):
confopts["private.network.device"] = prvNic
if pubNic == None or not device_exits(pubNic):
if pubNic == None or not device_exist(pubNic):
confopts["public.network.device"] = prvNic
stderr("Querying %s for zones and pods",host)