Skip to content

Commit

Permalink
Adds an aditional check to see if the license file is on a floating l…
Browse files Browse the repository at this point in the history
…icense server. (#9)
  • Loading branch information
STFleming authored Jan 24, 2024
1 parent e4e992a commit c74375d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions npu/build/build_template/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ if [ -z "$XILINXD_LICENSE_FILE" ]; then
echo "Please see https://riallto.ai/install-riallto.html for license setup instructions."
exit 1
else
# If variable set, see if file exists
if [ ! -e "$XILINXD_LICENSE_FILE" ]; then
echo "The license file $XILINXD_LICENSE_FILE does not exist."
echo "Please see https://riallto.ai/install-riallto.html for license setup instructions."
exit 1
# Check if XILINXD_LICENSE_FILE is a file
if [ -e "$XILINXD_LICENSE_FILE" ]; then
echo "Found license file: $XILINXD_LICENSE_FILE"
else
# Assume XILINXD_LICENSE_FILE is a server, try to ping
server_address=$(echo $XILINXD_LICENSE_FILE | cut -d@ -f2)
if ping -c 1 $server_address &> /dev/null; then
echo "Server $server_address is reachable."
else
echo "Could not find license file of reach server address $server_address."
echo "Please see https://riallto.ai/install-riallto.html for license setup instructions."
exit 1
fi
fi
fi
fi

0 comments on commit c74375d

Please sign in to comment.