rtdmnet module should follow same (un)loading rules as generic module stable-1.5
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 14 Sep 2018 17:59:33 +0200
branchstable-1.5
changeset 2710 05359dee3578
parent 2709 e0c2f17ebed1
child 2711 a5c4ccc02285
rtdmnet module should follow same (un)loading rules as generic module
script/ethercatctl.in
--- a/script/ethercatctl.in	Wed Sep 12 22:15:18 2018 +0200
+++ b/script/ethercatctl.in	Fri Sep 14 17:59:33 2018 +0200
@@ -108,7 +108,7 @@
             continue # ec_* module not found
         fi
 
-        if [ ${MODULE} != "generic" -a ${MODULE} != "ccat" ]; then
+        if [ ${MODULE} != "generic" -a ${MODULE} != "rtdmnet" -a ${MODULE} != "ccat" ]; then
             # try to unload standard module
             if ${LSMOD} | grep "^${MODULE} " > /dev/null; then
                 if ! ${RMMOD} ${MODULE}; then
@@ -119,7 +119,7 @@
         fi
 
         if ! ${MODPROBE} ${MODPROBE_FLAGS} ${ECMODULE}; then
-            if [ ${MODULE} != "generic" -a ${MODULE} != "ccat" ]; then
+            if [ ${MODULE} != "generic" -a ${MODULE} != "rtdmnet" -a ${MODULE} != "ccat" ]; then
                 ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE} # try to restore
             fi
             ${RMMOD} ${LOADED_MODULES}
@@ -150,7 +150,7 @@
 
     # load standard modules again
     for MODULE in ${DEVICE_MODULES}; do
-        if [ ${MODULE} == "generic" -o ${MODULE} == "ccat" ]; then
+        if [ ${MODULE} == "generic" -o ${MODULE} == "rtdmnet" -o ${MODULE} == "ccat" ]; then
             continue
         fi
         ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}