X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=xenserver%2Fetc_init.d_openvswitch;h=534b81d16861f117a949b959d1744091f679c46d;hb=1b0fdca5faa8674a5e67f7435a43b361fca003cf;hp=81039004035d5ca3eb75a152354b1c0ab06832b1;hpb=b3a375f242c70ff85c30f84ce311628de4a6f022;p=sliver-openvswitch.git diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index 810390040..534b81d16 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -81,6 +81,18 @@ start () { touch /var/lock/subsys/openvswitch } +force_reload_kmod () { + start force-reload-kmod + + # 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 +} + stop () { $ovs_ctl stop stop_daemon ovs-xapi-sync @@ -114,7 +126,7 @@ case $1 in $ovs_ctl version ;; force-reload-kmod) - start force-reload-kmod + force_reload_kmod ;; help) printf "openvswitch [start|stop|restart|reload|force-reload|status|version]\n"