# HG changeset patch # User Giulio Moro # Date 1466598151 -3600 # Node ID 03b511d99f3d2005b851ba1b20290178861d42c0 # Parent ce5bb14c21fb8bb746277ff9e600bfa07cc3496b bela_common was left out of the previous commit diff -r ce5bb14c21fb -r 03b511d99f3d scripts/.bela_common --- a/scripts/.bela_common Wed Jun 22 12:40:28 2016 +0100 +++ b/scripts/.bela_common Wed Jun 22 13:22:31 2016 +0100 @@ -30,3 +30,11 @@ # an optional parameter will be executed as part of the same ssh session ssh $BBB_ADDRESS "date -s \"`date '+%Y%m%d %T %Z'`\" > /dev/null; $1" } + +check_board_alive(){ + printf "Checking the board is up and running at $BBB_ADDRESS..." + ssh -o ConnectTimeout=10 $BBB_ADDRESS exit && printf "done\n" || { + printf "\nERROR: the board does not respond at $BBB_ADDRESS, check that the address is correct and the board is connected.\n"; + exit 1; + } +}