This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit bd11b85a827387f27191dba9356a64197b4db31f
Author: Rohit Yadav <[email protected]>
AuthorDate: Sat Dec 16 16:15:26 2017 +0530

    vmware: don't reboot, use udevadm to reconfigure nic/macs
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 systemvm/debian/opt/cloud/bin/cs/CsDhcp.py    | 2 +-
 systemvm/debian/opt/cloud/bin/setup/router.sh | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py 
b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
index 6680b94..7a574fa 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
@@ -80,7 +80,7 @@ class CsDhcp(CsDataBag):
             # DNS search order
             if gn.get_dns() and device:
                 sline = "dhcp-option=tag:interface-%s-%s,6" % (device, idx)
-                dns_list = [x for x in gn.get_dns() if x is not None]
+                dns_list = [x for x in gn.get_dns() if not (not x)]
                 line = "dhcp-option=tag:interface-%s-%s,6,%s" % (device, idx, 
','.join(dns_list))
                 self.conf.search(sline, line)
             # Gateway
diff --git a/systemvm/debian/opt/cloud/bin/setup/router.sh 
b/systemvm/debian/opt/cloud/bin/setup/router.sh
index c3141f8..f41e57e 100755
--- a/systemvm/debian/opt/cloud/bin/setup/router.sh
+++ b/systemvm/debian/opt/cloud/bin/setup/router.sh
@@ -59,10 +59,8 @@ setup_router() {
 
     if [ "$oldmd5" != "$newmd5" ]
     then
-      log_it "udev NIC assignment requires reboot to take effect"
-      sync
-      sleep 2
-      reboot
+      log_it "Reloading udev for new udev NIC assignment"
+      udevadm control --reload-rules && udevadm trigger
     fi
   fi
 

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to