: ${VSWITCHD_VALGRIND_LOG:=}
: ${VSWITCHD_VALGRIND_OPT:=}
+: ${OVS_XAPI_SYNC_PIDFILE:=/var/run/openvswitch/ovs-xapi-sync.pid}
+
# Full paths to executables & modules
ovsdb_server="/usr/sbin/ovsdb-server"
ovsdb_tool="/usr/bin/ovsdb-tool"
break
fi
done
- rm -f "$pidfile"
fi
}
function stop {
stop_daemon VSWITCHD "$vswitchd"
stop_daemon OVSDB_SERVER "$ovsdb_server"
- if [ -e /var/run/openvswitch/ovs-xapi-sync.pid ]; then
- kill `cat /var/run/openvswitch/ovs-xapi-sync.pid`
- fi
+ stop_daemon OVS_XAPI_SYNC ovs-xapi-sync
rm -f /var/lock/subsys/openvswitch
}
start
action "Restore interface configuration from $script" $script
+
+ # Restart the high-availability daemon if it is running. Otherwise
+ # it loses its heartbeat and reboots the system after a few minutes.
+ if pidof xhad >/dev/null && test -e /etc/xensource/xhad.conf; then
+ PATH=$PATH:/opt/xensource/xha
+ action "Stopping HA daemon" ha_stop_daemon
+ action "Starting HA daemon" ha_start_daemon
+ fi
}
case "$1" in