rc.suspend revision 50472
137Srgrimes#!/bin/sh
237Srgrimes#
337Srgrimes# $FreeBSD: head/etc/rc.suspend 50472 1999-08-27 23:37:10Z peter $
437Srgrimes#
537Srgrimes# sample run command file for APM Suspend Event
637Srgrimes
737Srgrimesif [ -f /var/run/rc.suspend.pid ]
837Srgrimesthen
937Srgrimes	exit 1
1037Srgrimesfi
1137Srgrimes
1237Srgrimesecho $$ > /var/run/rc.suspend.pid
1337Srgrimes
1437Srgrimes# If you have troubles on suspending with PC-CARD modem, try this.
1537Srgrimes# See also contrib/pccardq.c (Only for PAO users).
1637Srgrimes#pccardq | awk -F '~' '$5 == "filled" && $4 ~ /sio/ \
1737Srgrimes#	{ printf("pccardc power %d 0", $1); }' | sh
1837Srgrimes
1937Srgrimeslogger -t apmd suspend at `date +'%Y%m%d %H:%M:%S'`
2037Srgrimessync && sync && sync
2137Srgrimessleep 3
2237Srgrimes
2337Srgrimesrm -f /var/run/rc.suspend.pid
2437Srgrimeszzz
2537Srgrimes
2637Srgrimesexit 0
2737Srgrimes
2837Srgrimes