Commit efef51c2 authored by Vinicius Ruoso's avatar Vinicius Ruoso

Removed here-strings to use pipes on .po files

The 'here-string' redirections became pipes to satisfy the POSIX style
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent cad435bb
......@@ -21,13 +21,13 @@ prd_nobreak_www()
PSTATUS=red
STAT="AUSENTE"
elif grep -q "NOTDEFAULT" <<< "$STAT"; then
elif echo "$STAT" | grep -q "NOTDEFAULT"; then
PSTATETYPE="prd_nobreak_notinhosts_st:false"
PSTATETYPE="$PSTATETYPE prd_nobreak_notdefault_st:true"
PSTATETYPE="$PSTATETYPE prd_nobreak_no_st:false"
PSTATUS=gray
IP=$(cut -d+ -f2 <<< "$STAT")
IP=$(echo "$STAT" | cut -d+ -f2)
STAT="IP RUIM: $IP"
else
PSTATETYPE="prd_nobreak_notinhosts_st:false"
......
......@@ -15,13 +15,13 @@ prd_raid_www()
NOINFO="false"
IOERROR="false"
grep -q "OUT_OF_RAID" <<< "$PVALUE" && OUT="true"
grep -q "SYNCHRONIZING_RAID" <<< "$PVALUE" && SYNC="true"
grep -q "FAULTY" <<< "$PVALUE" && FAULTY="true"
grep -q "[1-9]_MISSING" <<< "$PVALUE" && MISSINGPART="true"
grep -q "sd[a,b]_MISSING" <<< "$PVALUE" && MISSINGDISK="true"
grep -q "NOINFO" <<< "$PVALUE" && NOINFO="true"
grep -q "IOERROR" <<< "$PVALUE" && IOERROR="true"
echo "$PVALUE" | grep -q "OUT_OF_RAID" && OUT="true"
echo "$PVALUE" | grep -q "SYNCHRONIZING_RAID" && SYNC="true"
echo "$PVALUE" | grep -q "FAULTY" && FAULTY="true"
echo "$PVALUE" | grep -q "[1-9]_MISSING" && MISSINGPART="true"
echo "$PVALUE" | grep -q "sd[a,b]_MISSING" && MISSINGDISK="true"
echo "$PVALUE" | grep -q "NOINFO" && NOINFO="true"
echo "$PVALUE" | grep -q "IOERROR" && IOERROR="true"
PSTATETYPE="prd_raid_out_st:$OUT prd_raid_sync_st:$SYNC"
PSTATETYPE="$PSTATETYPE prd_raid_faulty_st:$FAULTY"
......@@ -36,10 +36,10 @@ prd_raid_www()
PSTATUS=red
fi
if grep -q "OK" <<< "$PVALUE"; then
if echo "$PVALUE" | grep -q "OK"; then
PVALUE="OK"
else
PVALUE="$(cut -d"+" -f3 <<< "$PVALUE")"
PVALUE="$(echo "$PVALUE" | cut -d"+" -f3)"
fi
}
......
......@@ -13,7 +13,7 @@ prd_version_www()
PSTATETYPE="$PSTATETYPE prd_version_prd11_st:false"
PSTATETYPE="$PSTATETYPE prd_version_old_st:false"
PSTATUS=gray
elif grep -q "1\.1" <<< "$VERSION"; then
elif echo "$VERSION" | grep -q "1\.1"; then
PSTATETYPE="prd_ajudaremota_ajuda_st:false"
PSTATETYPE="$PSTATETYPE prd_version_noversion_st:false"
PSTATETYPE="$PSTATETYPE prd_version_prd11_st:true"
......
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