From 6c1b89ed0e6b9934d63ae4d71ba885bfcb87891a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 16 Dec 2009 13:40:55 -0800 Subject: [PATCH] debian: Don't unload kernel modules in init script on "stop" or "restart". Unloading kernel modules will destroy all of the datapaths, which is a drastic action. So we are probably better off doing that only if the user requests it explicitly. --- debian/openvswitch-switch.init | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 6db7c95b..bf71e7df 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -246,8 +246,6 @@ case "$1" in --pidfile /var/run/ovsdb-server.pid \ --exec $ovsdb_server echo "ovsdb-server." - - unload_modules ;; force-stop) echo -n "Forcefully stopping ovs-vswitchd: " @@ -265,8 +263,9 @@ case "$1" in else echo " ERROR." fi - - unload_modules + ;; + unload) + unload_modules ;; reload) ;; @@ -292,7 +291,7 @@ case "$1" in ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status|force-stop|unload}" >&2 exit 1 ;; esac -- 2.30.2