From: Ben Pfaff Date: Fri, 31 Oct 2008 15:56:03 +0000 (-0700) Subject: In openflow-switch init script, do not re-load openflow_mod if already loaded. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77171d02d67ff50d5095538c34cc5b3302f9b064;p=openvswitch In openflow-switch init script, do not re-load openflow_mod if already loaded. --- diff --git a/debian/openflow-switch.init b/debian/openflow-switch.init index 13f05dd3..cc5f954a 100755 --- a/debian/openflow-switch.init +++ b/debian/openflow-switch.init @@ -199,10 +199,12 @@ case "$1" in esac echo -n "Loading openflow_mod: " - if modprobe openflow_mod; then + if grep -q '^openflow_mod$' /proc/modules; then + echo "already loaded, nothing to do." + elif modprobe openflow_mod; then echo "success." else - echo " ERROR." + echo "ERROR." echo "openflow_mod has probably not been built for this kernel." if ! test -d /usr/share/doc/openflow-datapath-source; then echo "Install the openflow-datapath-source package, then read"