X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Fopenvswitch-switch.init;h=dd4bb05965bfd14dea8de92d84518687db6032b3;hb=310fae4bbe6734ffe245895e65849a6c92b46624;hp=c579a0887c289d8411a63aecc368956fc7694134;hpb=2b35e1475ef0c274495aa04d60b054288971d503;p=openvswitch diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index c579a088..dd4bb059 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -19,9 +19,9 @@ ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/secchan -NAME=secchan -DESC=secchan +DAEMON=/usr/sbin/ovs-openflowd +NAME=ovs-openflowd +DESC=ovs-openflowd test -x $DAEMON || exit 0 @@ -35,7 +35,7 @@ DODTIME=1 # Time to wait for the server to die, in seconds # let some servers to die gracefully and # 'restart' will not work -# Include secchan defaults if available +# Include ovs-openflowd defaults if available unset NETDEVS unset MODE unset SWITCH_IP @@ -261,6 +261,18 @@ case "$1" in exit 1 fi + echo -n "Loading ip_gre_mod: " + if grep -q '^ip_gre$' /proc/modules; then + modprobe -r ip_gre + fi + if grep -q '^ip_gre_mod$' /proc/modules; then + echo "already loaded, nothing to do." + elif modprobe ip_gre_mod; then + echo "success." + else + echo "could not find module." + fi + for netdev in $NETDEVS; do check_op "Removing IP address from $netdev" ifconfig $netdev 0.0.0.0 done @@ -319,7 +331,7 @@ case "$1" in check_op "Setting core limit to $CORE_LIMIT" ulimit -c "$CORE_LIMIT" fi - # Compose secchan options. + # Compose ovs-openflowd options. set -- set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err set -- "$@" --log-file @@ -386,6 +398,10 @@ case "$1" in echo "$NAME." check_op "Deleting datapath" ovs-dpctl del-dp of0 + echo -n "Unloading ip_gre module: " + if modprobe -r ip_gre_mod; then + echo "success." + fi check_op "Unloading kernel module" modprobe -r openvswitch_mod ;; force-stop)