From 9c2922956e1c2a6ba52acaa1169535d628071ed2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 19 Nov 2020 19:49:40 +0100 Subject: [PATCH] [openwrt] initial gps code --- openwrt-add-gps.sh | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/openwrt-add-gps.sh b/openwrt-add-gps.sh index 772e1e8..ae65aa5 100755 --- a/openwrt-add-gps.sh +++ b/openwrt-add-gps.sh @@ -1,5 +1,31 @@ #!/bin/sh -opkg install kmod-usb-acm +if [ $# -lt 1 ]; then + echo "$0 ip-address" + echo " ip-address: where to find the device" + exit 1 +fi -# ugps? + +set -x + +openwrt_ip=$1; shift + +ping -c3 ${openwrt_ip} +if [ $? -ne 0 ]; then + echo "Cannot reach ${openwrt_ip}, aborting" + exit 1 +fi + +cat <