Add a nice error message to ethercatctl in case of missing config.
This commit is contained in:
parent
722b2d607c
commit
55e77f964d
|
|
@ -102,6 +102,14 @@ start)
|
|||
MASTER_INDEX=$((${MASTER_INDEX} + 1))
|
||||
done
|
||||
|
||||
if [ -z "${DEVICES}" ]; then
|
||||
echo "ERROR: No network cards for EtherCAT specified."
|
||||
echo -n "Please edit ${ETHERCAT_CONFIG} with root permissions"
|
||||
echo -n " and set MASTER0_DEVICE variable to either a "
|
||||
echo "network interface name (like eth0) or to a MAC address."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# load master module
|
||||
if ! ${MODPROBE} ${MODPROBE_FLAGS} ec_master \
|
||||
main_devices="${DEVICES}" backup_devices="${BACKUPS}"; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue