Init script and sysconfig file for generic Ethernet driver.
This commit is contained in:
parent
f3975598ef
commit
c6b034d647
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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=""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue