From 77171d02d67ff50d5095538c34cc5b3302f9b064 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 31 Oct 2008 08:56:03 -0700 Subject: [PATCH] In openflow-switch init script, do not re-load openflow_mod if already loaded. --- debian/openflow-switch.init | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/openflow-switch.init b/debian/openflow-switch.init index 13f05dd33..cc5f954a4 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" -- 2.45.2