Module Name: src
Committed By: jruoho
Date: Tue Apr 10 13:58:52 UTC 2012
Modified Files:
src/etc/powerd/scripts: sensor_temperature
Log Message:
Gracefully shutdown upon reaching critical temperature levels. Prevents few
laptops (ThinkPad T61 and x61s, among others) from hitting the in-CPU reset.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/etc/powerd/scripts/sensor_temperature
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/powerd/scripts/sensor_temperature
diff -u src/etc/powerd/scripts/sensor_temperature:1.3 src/etc/powerd/scripts/sensor_temperature:1.4
--- src/etc/powerd/scripts/sensor_temperature:1.3 Thu Oct 11 00:30:48 2007
+++ src/etc/powerd/scripts/sensor_temperature Tue Apr 10 13:58:52 2012
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: sensor_temperature,v 1.3 2007/10/11 00:30:48 xtraeme Exp $
+# $NetBSD: sensor_temperature,v 1.4 2012/04/10 13:58:52 jruoho Exp $
#
# Generic script for temperature sensors.
#
@@ -15,6 +15,7 @@ normal)
;;
critical)
logger -p warning "${0}: ($1) critical state entered [${3}]" >&1
+ /sbin/shutdown -p now "${0}: CRITICAL TEMPERATURE! SHUTTING DOWN."
exit 0
;;
critical-under)
@@ -23,6 +24,7 @@ critical-under)
;;
critical-over)
logger -p warning "${0}: ($1) critical limit exceeded [${3}]" >&1
+ /sbin/shutdown -p now "${0}: CRITICAL TEMPERATURE! SHUTTING DOWN."
exit 0
;;
warning-under)