1*74c3bf4aSBrad Davis# apmd Configuration File 2*74c3bf4aSBrad Davis# 3*74c3bf4aSBrad Davis# 4*74c3bf4aSBrad Davis 5*74c3bf4aSBrad Davisapm_event SUSPENDREQ { 6*74c3bf4aSBrad Davis exec "/etc/rc.suspend apm suspend"; 7*74c3bf4aSBrad Davis} 8*74c3bf4aSBrad Davis 9*74c3bf4aSBrad Davisapm_event USERSUSPENDREQ { 10*74c3bf4aSBrad Davis exec "sync && sync && sync"; 11*74c3bf4aSBrad Davis exec "sleep 1"; 12*74c3bf4aSBrad Davis exec "apm -z"; 13*74c3bf4aSBrad Davis} 14*74c3bf4aSBrad Davis 15*74c3bf4aSBrad Davisapm_event NORMRESUME { 16*74c3bf4aSBrad Davis exec "/etc/rc.resume apm suspend"; 17*74c3bf4aSBrad Davis} 18*74c3bf4aSBrad Davis 19*74c3bf4aSBrad Davisapm_event STANDBYRESUME { 20*74c3bf4aSBrad Davis exec "/etc/rc.resume apm standby"; 21*74c3bf4aSBrad Davis} 22*74c3bf4aSBrad Davis 23*74c3bf4aSBrad Davis# resume event configuration for serial mouse users by 24*74c3bf4aSBrad Davis# reinitializing a moused(8) connected to a serial port. 25*74c3bf4aSBrad Davis# 26*74c3bf4aSBrad Davis#apm_event NORMRESUME { 27*74c3bf4aSBrad Davis# exec "kill -HUP `cat /var/run/moused.pid`"; 28*74c3bf4aSBrad Davis#} 29*74c3bf4aSBrad Davis 30*74c3bf4aSBrad Davis# suspend request event configuration for ATA HDD users: 31*74c3bf4aSBrad Davis# execute standby instead of suspend. 32*74c3bf4aSBrad Davis# 33*74c3bf4aSBrad Davis#apm_event SUSPENDREQ { 34*74c3bf4aSBrad Davis# reject; 35*74c3bf4aSBrad Davis# exec "sync && sync && sync"; 36*74c3bf4aSBrad Davis# exec "sleep 1"; 37*74c3bf4aSBrad Davis# exec "apm -Z"; 38*74c3bf4aSBrad Davis#} 39*74c3bf4aSBrad Davis 40*74c3bf4aSBrad Davis# Sample entries for battery state monitoring 41*74c3bf4aSBrad Davis#apm_battery 5% discharging { 42*74c3bf4aSBrad Davis# exec "logger -p user.emerg battery status critical!"; 43*74c3bf4aSBrad Davis# exec "echo T250L8CE-GE-C >/dev/speaker"; 44*74c3bf4aSBrad Davis#} 45*74c3bf4aSBrad Davis#apm_battery 1% discharging { 46*74c3bf4aSBrad Davis# exec "logger -p user.emerg battery low - emergency suspend"; 47*74c3bf4aSBrad Davis# exec "echo T250L16B+BA+AG+GF+FED+DC+CC >/dev/speaker"; 48*74c3bf4aSBrad Davis# exec "apm -z"; 49*74c3bf4aSBrad Davis#} 50*74c3bf4aSBrad Davis#apm_battery 99% charging { 51*74c3bf4aSBrad Davis# exec "logger -p user.notice battery fully charged"; 52*74c3bf4aSBrad Davis#} 53*74c3bf4aSBrad Davis 54*74c3bf4aSBrad Davis# apmd Configuration ends here 55