From 8f57d35747a3b3fabc33466563077373090f869c Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Tue, 2 Sep 2014 07:05:15 -0700
Subject: [PATCH] cache-error-trigger: remove bashism

Use "$(cat $F)" to instead of "$(< $F)" to debash.

Upstream-Status: Pending

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 triggers/cache-error-trigger |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/triggers/cache-error-trigger b/triggers/cache-error-trigger
index e32bfd6..785526f 100755
--- a/triggers/cache-error-trigger
+++ b/triggers/cache-error-trigger
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # cache error trigger. This shell script is executed by mcelog in daemon mode
 # when a CPU reports excessive corrected cache errors. This could be a indication
 # for future uncorrected errors.
@@ -28,7 +28,7 @@ for i in $AFFECTED_CPUS ; do
 	logger -s -p daemon.crit -t mcelog "Offlining CPU $i due to cache error threshold"
 	F=$(printf "/sys/devices/system/cpu/cpu%d/online" $i)
 	echo 0 > $F
-	if [ "$(< $F)" != "0" ] ; then
+	if [ "$(cat $F)" != "0" ] ; then
 		logger -s -p daemon.warn -t mcelog "Offlining CPU $i failed"
 		EXIT=1
 	fi
-- 
1.7.9.5

