diff --git a/plugins/emc/emc_vnx_block_lun_perfdata b/plugins/emc/emc_vnx_block_lun_perfdata index 01fdf08c..925cb1b0 100755 --- a/plugins/emc/emc_vnx_block_lun_perfdata +++ b/plugins/emc/emc_vnx_block_lun_perfdata @@ -167,7 +167,7 @@ fi # Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station. 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 | awk '{print \$1}' " } @@ -184,7 +184,7 @@ check_conf_and_set_vars () { fi #Choosing Cotrol Station. Code have to be "10" for CS in $cs_addr; do - if [[ "10" -eq "$(ssh_check_cmd $CS)" ]]; then + if [[ "10" = "$(ssh_check_cmd $CS)" ]]; then PRIMARY_CS=$CS SSH="ssh -q $username@$PRIMARY_CS " break diff --git a/plugins/emc/emc_vnx_file_ b/plugins/emc/emc_vnx_file_ index 058ce476..0b1fb295 100755 --- a/plugins/emc/emc_vnx_file_ +++ b/plugins/emc/emc_vnx_file_ @@ -145,7 +145,8 @@ nas_servers=${nas_servers:="server_2 server_3"} # Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station. 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 | awk '{print \$1}' " + } check_conf () { @@ -161,7 +162,7 @@ check_conf () { #Choosing Cotrol Station. Code have to be "10" for CS in $cs_addr; do - if [[ "10" -eq "$(ssh_check_cmd $CS)" ]]; then + if [[ "10" = "$(ssh_check_cmd $CS)" ]]; then PRIMARY_CS=$CS break fi