Vinzenz Feenstra has uploaded a new change for review.

Change subject: agent: Send non-blocking uninstalled notification without python
......................................................................

agent: Send non-blocking uninstalled notification without python

Remove the inline python script to send the non-blocking uninstalled
message and replace it with echo + dd

Change-Id: I8b2f84d56377ba4ba42ee206966b7b68deae7fc9
Signed-off-by: Vinzenz Feenstra <[email protected]>
---
M ovirt-guest-agent.spec
1 file changed, 3 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent 
refs/changes/12/13612/1

diff --git a/ovirt-guest-agent.spec b/ovirt-guest-agent.spec
index affb8c5..0f6688a 100644
--- a/ovirt-guest-agent.spec
+++ b/ovirt-guest-agent.spec
@@ -130,18 +130,9 @@
     VIRTIO=`grep "^device" %{_sysconfdir}/ovirt-guest-agent.conf | awk '{ 
print $3; }'`
     if [ -w $VIRTIO ]
     then
-        /usr/bin/python << EOF
-import os
-vp = None
-try:
-    vp = os.open('$VIRTIO', os.O_WRONLY|os.O_NONBLOCK)
-    os.write(vp, '{"__name__": "uninstalled" }\n')
-except OSError:
-    pass
-finally:
-    if vp:
-        os.close(vp)
-EOF
+        # Non blocking uninstalled notification
+        echo -e '{"__name__": "uninstalled"}\n' | dd of=$VIRTIO \
+            oflag=nonblock status=noxfer conv=nocreat 1>& /dev/null || :
     fi
 fi
 


--
To view, visit http://gerrit.ovirt.org/13612
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b2f84d56377ba4ba42ee206966b7b68deae7fc9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to