summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorge Kraft <george.kraft@calxeda.com>2013-04-26 16:10:28 -0500
committerGeorge Kraft <george.kraft@calxeda.com>2013-04-26 16:10:28 -0500
commit475e1bd37f46f16d6cba083eee67de1cec37855e (patch)
tree965e4aefe99253a7a1174597c5fd9d2207b584c1 /scripts
parent1b472ebf554121899919840f0feb19ea9d7023a6 (diff)
downloadcxmanage-475e1bd37f46f16d6cba083eee67de1cec37855e.tar.gz
CXMAN-186: Add some friendly error messages to sol_tabs
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sol_tabs10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/sol_tabs b/scripts/sol_tabs
index a4ad415..c5cb9fe 100755
--- a/scripts/sol_tabs
+++ b/scripts/sol_tabs
@@ -32,6 +32,16 @@
node_0_ip=$1
+# check for hostname arg
+if [ $# -eq 0 ] ; then
+ echo "Please specify a host, I.E. \"sol_tabs 192.168.100.100\""
+ exit 1
+fi
+
+# check for xdotool, wmctrl commands
+command -v xdotool &>/dev/null || { echo >&2 "xdotool is required but not installed. Aborting."; exit 1; }
+command -v wmctrl &>/dev/null || { echo >&2 "wmctrl is required but not installed. Aborting."; exit 1; }
+
for ip in `cxmanage ipinfo $node_0_ip | grep '\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}' | grep -v from | awk {'print $3'}`
do
echo $ip