diff --git a/agent/libexec/agent-runner.in b/agent/libexec/agent-runner.in index 8983aeda738..c1dc4a91dfc 100755 --- a/agent/libexec/agent-runner.in +++ b/agent/libexec/agent-runner.in @@ -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` diff --git a/python/lib/cloud_utils.py b/python/lib/cloud_utils.py index d9a825913ef..bcf31e23b3d 100644 --- a/python/lib/cloud_utils.py +++ b/python/lib/cloud_utils.py @@ -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)