You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/mcelog/files/mcelog-1.0_pre3_p20120918-b...

22 lines
729 B

From: Julian Ospald <hasufell@gentoo.org>
Date: Sat Jan 26 17:40:22 UTC 2013
Subject: remove bashisms
--- 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 @@
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