Change statepipe read method
This commit is contained in:
parent
0ffe48e080
commit
f20a9ca37b
4
bmc.sh
4
bmc.sh
|
@ -76,8 +76,8 @@ locate_off() {
|
|||
echo "locate_off" > ${bmcd_cmdpipe}
|
||||
}
|
||||
readpower() {
|
||||
powerstate_raw=$(echo < ${bmcd_statepipe})
|
||||
if [ "${powerstate_raw}" -eq 1 ]; then
|
||||
powerstate_raw=$(cat ${bmcd_statepipe})
|
||||
if [[ "${powerstate_raw}" -eq 1 ]]; then
|
||||
powerstate="\e[32mOn\e[0m"
|
||||
else
|
||||
powerstate="\e[31mOff\e[0m"
|
||||
|
|
Loading…
Reference in New Issue