diff --git a/script/init.d/ethercat.in b/script/init.d/ethercat.in index aed9990c8a1a0d21f258fa9d5712ff286b5f10c2..7131c88f91d6d075333de2f63ade6a00e9f19c2a 100755 --- a/script/init.d/ethercat.in +++ b/script/init.d/ethercat.in @@ -173,13 +173,17 @@ start) if ! ${MODINFO} ${ECMODULE} > /dev/null; then continue # ec_* module not found fi - if lsmod | grep "^${MODULE} " > /dev/null; then - if ! ${RMMOD} ${MODULE}; then - exit_fail + if [ ${MODULE} != "generic" ]; then + if lsmod | grep "^${MODULE} " > /dev/null; then + if ! ${RMMOD} ${MODULE}; then + exit_fail + fi fi fi if ! ${MODPROBE} ${MODPROBE_FLAGS} ${ECMODULE}; then - ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE} # try to restore module + if [ ${MODULE} != "generic" ]; then + ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE} # try to restore + fi exit_fail fi done @@ -205,8 +209,10 @@ stop) # reload previous modules for MODULE in ${DEVICE_MODULES}; do - if ! ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}; then - echo Warning: Failed to restore ${MODULE}. + if [ ${MODULE} != "generic" ]; then + if ! ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}; then + echo Warning: Failed to restore ${MODULE}. + fi fi done diff --git a/script/sysconfig/ethercat b/script/sysconfig/ethercat index 28d5977ebdde419370e46f3fe263be59a151969a..80420f1cf1dd9afada3c45b773e743e4a4da2f66 100644 --- a/script/sysconfig/ethercat +++ b/script/sysconfig/ethercat @@ -26,17 +26,21 @@ MASTER0_DEVICE="" #MASTER1_DEVICE="" # -# Ethernet driver modules to replace with EtherCAT-capable ones. +# Ethernet driver modules to use for EtherCAT operation. # -# The init script will try to unload the Ethernet driver modules in the list -# and replace them with the EtherCAT-capable ones, respectively. If a certain -# (EtherCAT-capable) driver is not found, a warning will appear. +# Specify a non-empty list of Ethernet drivers, that shall be used for EtherCAT +# operation. # -# Possible values: 8139too, e100, e1000, r8169. +# Except for the generic Ethernet driver module, the init script will try to +# unload the usual Ethernet driver modules in the list and replace them with +# the EtherCAT-capable ones. If a certain (EtherCAT-capable) driver is not +# found, a warning will appear. +# +# Possible values: 8139too, e100, e1000, r8169, generic. # Separate multiple drivers with spaces. # -# Note: The e100, e1000 and r8169 drivers are not built by default. Enable them -# with the --enable-<driver> configure switches. +# Note: The e100, e1000, r8169 and generic drivers are not built by default. +# Enable them with the --enable-<driver> configure switches. # DEVICE_MODULES=""