2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

renamed ssh_check

This commit is contained in:
Diver 2017-01-19 02:48:58 +03:00
parent 9171751df6
commit 51e003fe8f
2 changed files with 5 additions and 4 deletions

View File

@ -109,10 +109,11 @@
export LANG=C export LANG=C
TARGET=$(echo "${0##*/}" | cut -d _ -f 6) TARGET=$(echo "${0##*/}" | cut -d _ -f 6)
# "All SP's we have"
SPALL="SPA SPB" SPALL="SPA SPB"
NAVICLI="/nas/sbin/navicli" NAVICLI="/nas/sbin/navicli"
ssh_check() { ssh_check_cmd() {
ssh -q $username@$1 "/nasmcd/sbin/getreason | grep -w slot_\`/nasmcd/sbin/t2slot\` | cut -d- -f1" ssh -q $username@$1 "/nasmcd/sbin/getreason | grep -w slot_\`/nasmcd/sbin/t2slot\` | cut -d- -f1"
} }
@ -130,7 +131,7 @@ check_conf () {
#Choosing Cotrol Station. Code have to be "10" #Choosing Cotrol Station. Code have to be "10"
for CS in $cs_addr; do for CS in $cs_addr; do
if [[ "10" -eq "$(ssh_check $CS)" ]]; then if [[ "10" -eq "$(ssh_check_cmd \"$CS\")" ]]; then
PRIMARY_CS=$CS PRIMARY_CS=$CS
break break
fi fi

View File

@ -84,7 +84,7 @@ export LANG=C
. "$MUNIN_LIBDIR/plugins/plugin.sh" . "$MUNIN_LIBDIR/plugins/plugin.sh"
ssh_check() { ssh_check_cmd() {
ssh -q $username@$1 "/nasmcd/sbin/getreason | grep -w slot_\`/nasmcd/sbin/t2slot\` | cut -d- -f1" ssh -q $username@$1 "/nasmcd/sbin/getreason | grep -w slot_\`/nasmcd/sbin/t2slot\` | cut -d- -f1"
} }
@ -101,7 +101,7 @@ check_conf () {
#Choosing Cotrol Station. Code have to be "10" #Choosing Cotrol Station. Code have to be "10"
for CS in $cs_addr; do for CS in $cs_addr; do
if [[ "10" -eq "$(ssh_check $CS)" ]]; then if [[ "10" -eq "$(ssh_check_cmd \"$CS\")" ]]; then
# echo "$CS is Primary" # echo "$CS is Primary"
PRIMARY_CS=$CS PRIMARY_CS=$CS
break break