From b75d61ac40c8016a8786b900e3812faa0b7074c3 Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Tue, 31 Oct 2017 14:59:19 -0600 Subject: Daemon scripts cleanup Added shaper_daemon to run_daemons.sh and stop_daemons.sh. Fixed the path and parameters for maap_daemon. IGB is now initialized separately, as the daemons can be run without it. Don't assume the name of the NIC, and don't include "sudo" in the script, to be consistent with the other run_*.sh scripts. --- run_daemons.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'run_daemons.sh') diff --git a/run_daemons.sh b/run_daemons.sh index 30da552d..63645541 100755 --- a/run_daemons.sh +++ b/run_daemons.sh @@ -6,28 +6,26 @@ nic=$1 if [ "$1" == "-h" ]; then echo "Usage: $0 " echo " eg: $0 eth1" + echo "" + echo "If you are using IGB, call \"sudo ./run_igb.sh\" before running this script." + echo "" exit fi if [ "$1" == "" ]; then - nic="eth1" #edit as required - echo "Network interface not specified, assuming: $nic" + echo "Please enter network interface name as parameter. For example:" + echo "sudo $0 eth1" + echo "" + echo "If you are using IGB, call \"sudo ./run_igb.sh\" before running this script." + echo "" + exit -1 fi echo "Starting daemons on "$nic -#use false for silence -if true; then - sudo rmmod igb - sudo insmod kmod/igb/igb_avb.ko - sudo groupadd ptp -else - sudo rmmod igb > /dev/null 2>&1 - sudo insmod kmod/igb/igb_avb.ko > /dev/null 2>&1 - sudo groupadd ptp > /dev/null 2>&1 -fi - -sudo daemons/gptp/linux/build/obj/daemon_cl $nic & -sudo daemons/mrpd/mrpd -mvs -i $nic & -sudo daemons/maap/linux/maap_daemon -i $nic & +groupadd ptp > /dev/null 2>&1 +daemons/gptp/linux/build/obj/daemon_cl $1 & +daemons/mrpd/mrpd -mvs -i $1 & +daemons/maap/linux/build/maap_daemon -i $1 -d /dev/null +daemons/shaper/shaper_daemon -d & -- cgit v1.2.1