Change statepipe read method
This commit is contained in:
		
							
								
								
									
										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"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user