Commit 20d754a1 authored by Michael Völske's avatar Michael Völske

generalize check_dimms to work also with deltaweb

parent 9d2cd1ed
......@@ -9,21 +9,13 @@
scriptPath=${0%/*}
. "$scriptPath"/../../libs/bashhelper.sh
. "$scriptPath"/../../libs/shflags
check_tools "ssh" "sshpass" "awk" "xargs"
BETAWEB_FIRST=1
BETAWEB_LAST=135
usage() {
echo "
Usage:
$(basename "$0") [fist_betaweb_host last_betaweb_host]
The scanned host numbers are ${BETAWEB_FIRST} through ${BETAWEB_LAST} by default.
"
}
DEFINE_integer 'first_host' 1 'first host number to check' f
DEFINE_integer 'last_host' 135 'last host number to check' l
DEFINE_string 'host_pattern' 'betamng%03d' 'printf-style pattern to insert the host number into the name' p
if [ -z ${SSHPASS+x} ]; then
......@@ -72,14 +64,14 @@ END {
EOF
main() {
FIRST=${1:-${BETAWEB_FIRST}}
LAST=${2:-${BETAWEB_LAST}}
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"
export SSHPASS
export PARSE_IDRAC_REPORT
seq $FIRST $LAST \
| xargs printf "betamng%03d " \
seq $FLAGS_first_host $FLAGS_last_host \
| xargs printf "${FLAGS_host_pattern} " \
| xargs -n1 -P0 \
bash -c 'sshpass -e \
ssh -q \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment