Gracefully shutdown upon reaching critical temperature levels. Prevents few

laptops (ThinkPad T61 and x61s, among others) from hitting the in-CPU reset.
This commit is contained in:
jruoho 2012-04-10 13:58:52 +00:00
parent 0addcacfb8
commit 23fb23b458
1 changed files with 3 additions and 1 deletions

View File

@ -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)