1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#!/bin/sh
#
# apmd_proxy - program dispatcher for APM daemon
#
# Craig Markwardt (craigm@lheamail.gsfc.nasa.gov) 21 May 1999
# David Brownell (db@post.harvard.edu) 9 June 1999
#
# This shell script is called by the APM daemon (apmd) when the state
# of any power management function has changed. The exact events that
# trigger the calling of apmd_proxy depend on how apmd was configured
# at compile time.
#
# Within this script the system administrator should put any commands
# or actions which should be performed upon state transitions.
#
# apmd_proxy is called with specific arguments that describe the event
# that has occurred. It is this script's responsibility to query the
# hardware or the APM service (via /proc/apm) for more information
# and to take the appropriate action.
#
# For example, apmd will call "apmd_proxy suspend system" just before
# the system is scheduled to go into suspend mode. The administrator
# may wish to perform site-specific actions like unloading drivers or
# disabling the network interface. When the system is resumed later,
# apmd will call "apmd_proxy resume normal", at which time those actions
# should be reversed.
#
# Here are the calling sequences for apmd_proxy:
#
# apmd_proxy start - APM daemon has started
# apmd_proxy stop - APM daemon is shutting down
# apmd_proxy suspend system - APM system has requested suspend mode
# apmd_proxy suspend critical - APM system indicates critical suspend (*)
# apmd_proxy standby system - APM system has requested standby mode
# apmd_proxy suspend user - User has requested suspend mode
# apmd_proxy standby user - User has requested standby mode
# apmd_proxy resume suspend - System has resumed from suspend mode
# apmd_proxy resume standby - System has resumed from standby mode
# apmd_proxy resume critical - System has resumed from critical suspend
# apmd_proxy change battery - APM system reported low battery
# apmd_proxy change power - APM system reported AC/battery change
# apmd_proxy change time - APM system reported need for time update (*)
# apmd_proxy change capability - APM system reported config. change (+)
#
# (*) - APM daemon may be modified to call these sequences
# (+) - Available if kernel APM driver supports it
|