From: Ben Pfaff Date: Wed, 16 Dec 2009 21:40:55 +0000 (-0800) Subject: debian: Don't unload kernel modules in init script on "stop" or "restart". X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c1b89ed0e6b9934d63ae4d71ba885bfcb87891a;p=openvswitch 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. --- 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