From f20a9ca37b5621f03b00954b89677859650d5979 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 31 Mar 2017 05:03:39 +0000 Subject: [PATCH] Change statepipe read method --- bmc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmc.sh b/bmc.sh index e018d35..ad0a57b 100755 --- a/bmc.sh +++ b/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"