diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-06-17 16:24:54 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-06-20 11:46:52 -0700 |
| commit | 5ae616d6387a4c5332b8018f204899fb6bd7c9b9 (patch) | |
| tree | e18fbe2b540457e4efde0ed82db35b08121dfba6 /debian | |
| parent | 9c16ed644efc7f36a073c45529353ffc0a1542a3 (diff) | |
| download | openvswitch-5ae616d6387a4c5332b8018f204899fb6bd7c9b9.tar.gz | |
Fix force-reload-kmod initscript command implementations.
I screwed this up in the recent conversion.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'debian')
| -rwxr-xr-x | debian/openvswitch-switch.init | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 9c7343b3f..a65af0ce1 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -25,38 +25,48 @@ (test -x /usr/sbin/ovs-vswitchd && test -x /usr/bin/ovsdb-server) || exit 0 -set -e - test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl -case $1 in - start) - set $ovs_ctl start --system-id=random - if test X"$FORCE_COREFILES" != X; then - set "$@" --force-corefiles="$FORCE_COREFILES" - fi - # Allow GRE traffic. - test ! -x /sbin/iptables || /sbin/iptables -I INPUT -p gre -j ACCEPT +start () { + set $ovs_ctl ${1-start} --system-id=random + if test X"$FORCE_COREFILES" != X; then + set "$@" --force-corefiles="$FORCE_COREFILES" + fi - "$@" - ;; + # Allow GRE traffic. + test ! -x /sbin/iptables || /sbin/iptables -I INPUT -p gre -j ACCEPT + + "$@" +} + +stop () { + $ovs_ctl stop +} + +case $1 in + start) + start + ;; stop | force-stop) - $ovs_ctl stop + stop ;; reload | force-reload) # The OVS daemons keep up-to-date. ;; restart) - $0 stop || true - $0 start + stop + start ;; status) $ovs_ctl status ;; + force-reload-kmod) + start force-reload-kmod + ;; *) - echo "Usage: $0 {start|stop|restart|force-reload|status|force-stop}" >&2 + echo "Usage: $0 {start|stop|restart|force-reload|status|force-stop|force-reload-kmod}" >&2 exit 1 ;; esac |
