Avoid replacing ccat driver. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Fri, 25 Apr 2014 17:32:26 +0200
branchstable-1.5
changeset 2560 442634814e29
parent 2559 a24ff468cb25
child 2561 4839e81d2bdd
Avoid replacing ccat driver.
script/ethercatctl.in
--- a/script/ethercatctl.in	Fri Apr 25 17:05:39 2014 +0200
+++ b/script/ethercatctl.in	Fri Apr 25 17:32:26 2014 +0200
@@ -107,7 +107,7 @@
             continue # ec_* module not found
         fi
 
-        if [ ${MODULE} != "generic" ]; then
+        if [ ${MODULE} != "generic" -a ${MODULE} != "ccat" ]; then
             # try to unload standard module
             if lsmod | grep "^${MODULE} " > /dev/null; then
                 if ! ${RMMOD} ${MODULE}; then
@@ -118,7 +118,7 @@
         fi
 
         if ! ${MODPROBE} ${MODPROBE_FLAGS} ${ECMODULE}; then
-            if [ ${MODULE} != "generic" ]; then
+            if [ ${MODULE} != "generic" -a ${MODULE} != "ccat" ]; then
                 ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE} # try to restore
             fi
             ${RMMOD} ${LOADED_MODULES}
@@ -149,7 +149,7 @@
 
     # load standard modules again
     for MODULE in ${DEVICE_MODULES}; do
-        if [ ${MODULE} == "generic" ]; then
+        if [ ${MODULE} == "generic" -o ${MODULE} == "ccat" ]; then
             continue
         fi
         ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}