init.sh 453 Bytes
Newer Older
Lucas Russo's avatar
Lucas Russo committed
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash

# Broker Endpoint
EXPECTED_ARGS=1

if [ "$(id -u)" != "0" ]
then
	echo "This must be run as root"
	exit 1
fi

if [ $# -ne $EXPECTED_ARGS ]
then
14
	echo "Error: Broker endpoint not set!"
Lucas Russo's avatar
Lucas Russo committed
15 16 17 18 19 20
	echo "Usage: `basename $0` {broker endpoint}"
	exit 1;
fi

broker_endp=$1

21 22
# Launch Device Manager
./dev_mngr -v -b "ipc://"$broker_endp &
Lucas Russo's avatar
Lucas Russo committed
23 24 25 26 27
# Signal dev_mngr of a "new" PCIe device
killall -SIGUSR1 dev_mngr

# Change IPC permissions
chmod 777 $broker_endp