diff --git a/script/ethercatctl.in b/script/ethercatctl.in index 2da6e95b..ab3f45a8 100755 --- a/script/ethercatctl.in +++ b/script/ethercatctl.in @@ -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