diff --git a/script/ethercatctl.in b/script/ethercatctl.in index fa7b15ef..5d7f47fa 100755 --- a/script/ethercatctl.in +++ b/script/ethercatctl.in @@ -95,7 +95,7 @@ start) done # load master module - if ! ${MODPROBE} "${MODPROBE_FLAGS}" ec_master \ + if ! ${MODPROBE} ${MODPROBE_FLAGS} ec_master \ main_devices="${DEVICES}" backup_devices="${BACKUPS}"; then exit 1 fi @@ -119,11 +119,11 @@ start) fi fi - if ! ${MODPROBE} "${MODPROBE_FLAGS}" "${ECMODULE}"; then + if ! ${MODPROBE} ${MODPROBE_FLAGS} "${ECMODULE}"; then if [ "${MODULE}" != "generic" ] && [ "${MODULE}" != "ccat" ]; then - ${MODPROBE} "${MODPROBE_FLAGS}" "${MODULE}" # try to restore + ${MODPROBE} ${MODPROBE_FLAGS} "${MODULE}" # try to restore fi - ${RMMOD} "${LOADED_MODULES}" + ${RMMOD} ${LOADED_MODULES} exit 1 fi @@ -154,7 +154,7 @@ stop) if [ "${MODULE}" == "generic" ] || [ "${MODULE}" == "ccat" ]; then continue fi - ${MODPROBE} "${MODPROBE_FLAGS}" "${MODULE}" + ${MODPROBE} ${MODPROBE_FLAGS} "${MODULE}" done exit 0 diff --git a/script/init.d/ethercat.in b/script/init.d/ethercat.in index ac078234..51652d41 100755 --- a/script/init.d/ethercat.in +++ b/script/init.d/ethercat.in @@ -166,7 +166,7 @@ start) done # load master module - if ! ${MODPROBE} "${MODPROBE_FLAGS}" ec_master "${MASTER_ARGS}" \ + if ! ${MODPROBE} ${MODPROBE_FLAGS} ec_master "${MASTER_ARGS}" \ main_devices="${DEVICES}" backup_devices="${BACKUPS}"; then exit_fail fi @@ -184,9 +184,9 @@ start) fi fi fi - if ! ${MODPROBE} "${MODPROBE_FLAGS}" "${ECMODULE}"; then + if ! ${MODPROBE} ${MODPROBE_FLAGS} "${ECMODULE}"; then if [ "${MODULE}" != "generic" ]; then - ${MODPROBE} "${MODPROBE_FLAGS}" "${MODULE}" # try to restore + ${MODPROBE} ${MODPROBE_FLAGS} "${MODULE}" # try to restore fi exit_fail fi @@ -214,7 +214,7 @@ stop) # reload previous modules for MODULE in ${DEVICE_MODULES}; do if [ "${MODULE}" != "generic" ]; then - if ! ${MODPROBE} "${MODPROBE_FLAGS}" "${MODULE}"; then + if ! ${MODPROBE} ${MODPROBE_FLAGS} "${MODULE}"; then echo Warning: Failed to restore "${MODULE}". fi fi