tests: New m4 macro ON_EXIT to add a cleanup action.
[sliver-openvswitch.git] / tests / ovs-xapi-sync.at
index 25acc74..29d4737 100644 (file)
@@ -16,7 +16,7 @@ cp "$top_srcdir/vswitchd/vswitch.ovsschema" .
 cp "$top_srcdir/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync" \
    ovs-xapi-sync
 
-trap 'kill `cat pid ovs-xapi-sync.pid`' 0
+ON_EXIT([kill `cat pid ovs-xapi-sync.pid`])
 
 mkdir var var/run
 touch var/run/xapi_init_complete.cookie