mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix adding customized public/private nics for kvm
This commit is contained in:
parent
b13f5574ec
commit
72e82c8c8c
@ -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`
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user