[NSIS 5/5] ovirt: Add ovirt-guest-agent service removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinzenz Feenstra <vfeenstr@xxxxxxxxxx>

Previously the ovirt guest agent service registration has not been
removed during the uninstallation.
This patch adds the removal code.

Change-Id: I9e2f89b01468ea51fe64afb68a75c50eb21888c1
Signed-off-by: Vinzenz Feenstra <vfeenstr@xxxxxxxxxx>
---
 win-guest-tools.nsis | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/win-guest-tools.nsis b/win-guest-tools.nsis
index 9679a7f..4e5464e 100644
--- a/win-guest-tools.nsis
+++ b/win-guest-tools.nsis
@@ -232,6 +232,8 @@ Section "Uninstall"
   RMDir /rebootok "$INSTDIR\64"
   RMDir /rebootok /r "$INSTDIR\drivers"
 !ifdef OVIRT
+  Call un.UninstallOVirtAgentService
+
   Delete /rebootok "$INSTDIR\OVirtGuestService.exe"
 
   Delete /rebootok "$INSTDIR\default.ini"
@@ -446,6 +448,14 @@ Function InstallOVirtAgentService
   push "OVirtGuestService"
   Call InstallService
 FunctionEnd
+
+Function un.UninstallOVirtAgentService
+  SimpleSC::ExistsService "OVirtGuestService"
+  Pop $0
+  ${if} $0 == 0
+    SimpleSC::RemoveService "OVirtGuestService"
+  ${endif}
+FunctionEnd
 !endif
 
 Function InstallBalloonService
-- 
2.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]