Skip to content
Snippets Groups Projects
Commit a69783f0 authored by Florian Pose's avatar Florian Pose
Browse files

Init script and sysconfig file for generic Ethernet driver.

parent 0715ffc2
No related branches found
No related tags found
No related merge requests found
...@@ -173,13 +173,17 @@ start) ...@@ -173,13 +173,17 @@ start)
if ! ${MODINFO} ${ECMODULE} > /dev/null; then if ! ${MODINFO} ${ECMODULE} > /dev/null; then
continue # ec_* module not found continue # ec_* module not found
fi fi
if lsmod | grep "^${MODULE} " > /dev/null; then if [ ${MODULE} != "generic" ]; then
if ! ${RMMOD} ${MODULE}; then if lsmod | grep "^${MODULE} " > /dev/null; then
exit_fail if ! ${RMMOD} ${MODULE}; then
exit_fail
fi
fi fi
fi fi
if ! ${MODPROBE} ${MODPROBE_FLAGS} ${ECMODULE}; then 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 exit_fail
fi fi
done done
...@@ -205,8 +209,10 @@ stop) ...@@ -205,8 +209,10 @@ stop)
# reload previous modules # reload previous modules
for MODULE in ${DEVICE_MODULES}; do for MODULE in ${DEVICE_MODULES}; do
if ! ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}; then if [ ${MODULE} != "generic" ]; then
echo Warning: Failed to restore ${MODULE}. if ! ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}; then
echo Warning: Failed to restore ${MODULE}.
fi
fi fi
done done
......
...@@ -26,17 +26,21 @@ MASTER0_DEVICE="" ...@@ -26,17 +26,21 @@ MASTER0_DEVICE=""
#MASTER1_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 # Specify a non-empty list of Ethernet drivers, that shall be used for EtherCAT
# and replace them with the EtherCAT-capable ones, respectively. If a certain # operation.
# (EtherCAT-capable) driver is not found, a warning will appear.
# #
# 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. # Separate multiple drivers with spaces.
# #
# Note: The e100, e1000 and r8169 drivers are not built by default. Enable them # Note: The e100, e1000, r8169 and generic drivers are not built by default.
# with the --enable-<driver> configure switches. # Enable them with the --enable-<driver> configure switches.
# #
DEVICE_MODULES="" DEVICE_MODULES=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment