3 # autoboot-helper -- automatic boot helper
5 # Some machines have real issues rebooting. This helper watches their
6 # console output for the telltale signs of a reboot in progress. When
7 # spotted this triggers an automated 'manual' hardreset. For use when
8 # machines fail to reboot at the BIOS level.
10 # (C) Copyright IBM Corp. 2004, 2005, 2006
11 # Author: Andy Whitcroft <andyw@uk.ibm.com>
13 # The Console Multiplexor is released under the GNU Public License V2
15 set P "autoboot-numaq"
19 puts stderr "Usage: $P"
25 puts stderr "$P: $msg"
29 puts stderr "$P: $msg"
37 warn "test trigger detected"
40 {Unmounting file systems} {
41 note "controlled reboot in progress ..."
42 set likely [clock seconds]
45 {Unmounting local filesystems...} {
46 note "controlled reboot in progress ..."
47 set likely [clock seconds]
50 -ex {***** REBOOT LINUX *****} {
51 note "fsck failure occured ..."
52 set likely [clock seconds]
55 {Restarting system.} {
57 warn "shutdown complete, restart indicated"
61 warn "likely false positive"
66 if {$likely > 0 && ([clock seconds] - $likely) > 60} {
67 warn "trigger timeout"