Remove manual creation of device nodes, this is done by udev.
--- a/script/init.d/ethercat Tue Jun 17 13:03:33 2008 +0000
+++ b/script/init.d/ethercat Tue Jun 17 13:27:28 2008 +0000
@@ -49,7 +49,6 @@
#------------------------------------------------------------------------------
-CDEV='EtherCAT'
MODPROBE=/sbin/modprobe
RMMOD=/sbin/rmmod
MODINFO=/sbin/modinfo
@@ -173,7 +172,6 @@
MASTER_INDEX=$(expr ${MASTER_INDEX} + 1)
done
- MASTER_INDICES=`seq 0 $((${MASTER_INDEX} - 1))`
# load master module
if ! ${MODPROBE} ${MODPROBE_FLAGS} ec_master \
@@ -181,22 +179,6 @@
exit_fail
fi
- # remove stale device nodes
- rm -f /dev/${CDEV}*
-
- # get dynamic major number
- MAJOR=$(awk "\$2==\"EtherCAT\" {print \$1}" /proc/devices)
- if [ -z "${MAJOR}" ]; then
- echo "Failed to get device major number!"
- ${RMMOD} ec_master
- exit_fail
- fi
-
- # create character devices
- for i in ${MASTER_INDICES}; do
- mknod /dev/${CDEV}${i} c ${MAJOR} ${i}
- done
-
# check for modules to replace
for MODULE in ${DEVICE_MODULES}; do
ECMODULE=ec_${MODULE}
@@ -231,9 +213,6 @@
fi;
done
- # remove device nodes
- rm -f /dev/${CDEV}*
-
sleep 1
# reload previous modules