2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 09:58:01 +00:00
ovs/rhel/usr_share_openvswitch_scripts_ovs-systemd-reload
Timothy Redaelli 8b54e31ff3 rhel: add "force-reload-kmod" support in "ovs-systemd-reload"
Since you can't use "ovs-ctl force-reload-kmod" on Fedora/RHEL, due to
systemd dependencies, this commit adds the "force-reload-kmod" feature on
ovs-systemd-reload.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
2018-01-08 10:39:47 -08:00

50 lines
1.1 KiB
Bash
Executable File

#! /bin/sh
# Copyright (c) 2017 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
case $0 in
*/*) dir0=`echo "$0" | sed 's,/[^/]*$,,'` ;;
*) dir0=./ ;;
esac
. "$dir0/ovs-lib" || exit 1
stop_ovsdb() {
systemctl --job-mode=ignore-dependencies stop ovsdb-server
}
start_ovsdb() {
systemctl --job-mode=ignore-dependencies start ovsdb-server
}
stop_forwarding() {
systemctl --job-mode=ignore-dependencies stop ovs-vswitchd
}
start_forwarding() {
systemctl --job-mode=ignore-dependencies start ovs-vswitchd
}
add_managers() {
:
}
if [ "$1" = "force-reload-kmod" ]; then
force_reload_kmod
else
restart
fi
exit 0