diff options
author | George Kraft <george.kraft@calxeda.com> | 2013-04-26 16:10:28 -0500 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2013-04-26 16:10:28 -0500 |
commit | 475e1bd37f46f16d6cba083eee67de1cec37855e (patch) | |
tree | 965e4aefe99253a7a1174597c5fd9d2207b584c1 /scripts | |
parent | 1b472ebf554121899919840f0feb19ea9d7023a6 (diff) | |
download | cxmanage-475e1bd37f46f16d6cba083eee67de1cec37855e.tar.gz |
CXMAN-186: Add some friendly error messages to sol_tabs
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/sol_tabs | 10 |
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 |