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

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


The following commit(s) were added to refs/heads/4.11 by this push:
     new ea33a35  debian: Use only `-l` for libvirtd default file on debian 
(#2550)
ea33a35 is described below

commit ea33a3529785efea24dbd5dd096cdc9ffb869dd8
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Wed Apr 11 14:08:57 2018 +0530

    debian: Use only `-l` for libvirtd default file on debian (#2550)
    
    This fixes #2546
    
    Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>
---
 python/lib/cloud_utils.py              | 2 +-
 python/lib/cloudutils/serviceConfig.py | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/python/lib/cloud_utils.py b/python/lib/cloud_utils.py
index 43c93c8..a9afb04 100644
--- a/python/lib/cloud_utils.py
+++ b/python/lib/cloud_utils.py
@@ -759,7 +759,7 @@ class SetupLiveMigration(ConfigTask):
                        if os.path.exists("/etc/init/libvirt-bin.conf"):
                                replace_line("/etc/init/libvirt-bin.conf", 
"exec /usr/sbin/libvirtd","exec /usr/sbin/libvirtd -d -l")
                        else:
-                               
replace_or_add_line("/etc/default/libvirt-bin","libvirtd_opts=","libvirtd_opts='-l
 -d'")
+                               
replace_or_add_line("/etc/default/libvirt-bin","libvirtd_opts=","libvirtd_opts='-l'")
                        
                else:
                        raise AssertionError("Unsupported distribution")
diff --git a/python/lib/cloudutils/serviceConfig.py 
b/python/lib/cloudutils/serviceConfig.py
index c9c019c..68d1b9c 100755
--- a/python/lib/cloudutils/serviceConfig.py
+++ b/python/lib/cloudutils/serviceConfig.py
@@ -526,9 +526,12 @@ class libvirtConfigUbuntu(serviceCfgBase):
         if os.path.exists("/etc/init/libvirt-bin.conf"):
             cfo = configFileOps("/etc/init/libvirt-bin.conf", self)
             cfo.replace_line("exec /usr/sbin/libvirtd","exec 
/usr/sbin/libvirtd -d -l")
-        else:
+        elif os.path.exists("/etc/default/libvirt-bin"):
             cfo = configFileOps("/etc/default/libvirt-bin", self)
-            cfo.replace_or_add_line("libvirtd_opts=","libvirtd_opts='-l -d'")
+            cfo.replace_or_add_line("libvirtd_opts=","libvirtd_opts='-l'")
+        elif os.path.exists("/etc/default/libvirtd"):
+            cfo = configFileOps("/etc/default/libvirtd", self)
+            cfo.replace_or_add_line("libvirtd_opts=","libvirtd_opts='-l'")
 
     def config(self):
         try:

-- 
To stop receiving notification emails like this one, please contact
ro...@apache.org.

Reply via email to