# HG changeset patch # User Florian Pose # Date 1144654193 0 # Node ID 99907332ff1e552d5756743503cd814c61e77332 # Parent 10e182a8bc4eab90a077307d3801a5a2cdae4560 Restart action in RC script diff -r 10e182a8bc4e -r 99907332ff1e ethercat.sh --- a/ethercat.sh Fri Apr 07 14:35:29 2006 +0000 +++ b/ethercat.sh Mon Apr 10 07:29:53 2006 +0000 @@ -14,7 +14,7 @@ print_usage() { - echo "Usage $0 { start | stop }" + echo "Usage: $0 { start | stop | restart }" } unload_module() @@ -45,19 +45,22 @@ fi case $ACTION in - start) + start | restart) echo "Starting EtherCAT master..." + # remove modules unload_module 8139too unload_module 8139cp unload_module ec_8139too unload_module ec_master + echo " loading master modules..." if ! modprobe ec_8139too ec_device_index=$DEVICEINDEX; then echo "ERROR: Failed to load module!" exit 1 fi ;; + stop) echo "Stopping EtherCAT master..." unload_module ec_8139too @@ -66,6 +69,7 @@ echo "Warning: Failed to restore 8139too module." fi ;; + *) print_usage exit 1