summaryrefslogtreecommitdiff
path: root/run_daemons.sh
diff options
context:
space:
mode:
authorBrant Thomsen <brant.thomsen@harman.com>2017-10-31 14:59:19 -0600
committerBrant Thomsen <brant.thomsen@harman.com>2017-10-31 15:07:29 -0600
commitb75d61ac40c8016a8786b900e3812faa0b7074c3 (patch)
tree8c00921b0af8e54feef9b16b4d0faa13e2fa0bb9 /run_daemons.sh
parent63d6e10eac6ba0d3b3b4c19b43b7a1d41a138cae (diff)
downloadOpen-AVB-b75d61ac40c8016a8786b900e3812faa0b7074c3.tar.gz
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.
Diffstat (limited to 'run_daemons.sh')
-rwxr-xr-xrun_daemons.sh30
1 files changed, 14 insertions, 16 deletions
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 <network interface>"
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 &