Skip to content

Commit f38db8a

Browse files
authored
Ubuntu 20.04: restart libvirtd instead of libvirt-bin (#4301)
1 parent c732865 commit f38db8a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/lib/cloudutils/serviceConfig.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,11 @@ def config(self):
592592
cfo.addEntry("group", "\"root\"")
593593
cfo.save()
594594

595-
self.syscfg.svo.stopService("libvirt-bin")
596-
self.syscfg.svo.enableService("libvirt-bin")
595+
if os.path.exists("/lib/systemd/system/libvirtd.service"):
596+
bash("systemctl restart libvirtd")
597+
else:
598+
self.syscfg.svo.stopService("libvirt-bin")
599+
self.syscfg.svo.enableService("libvirt-bin")
597600
if os.path.exists("/lib/systemd/system/libvirt-bin.socket"):
598601
bash("systemctl stop libvirt-bin.socket")
599602
return True

0 commit comments

Comments
 (0)