summaryrefslogtreecommitdiffstats
path: root/etc/rc.suspend
blob: 24136d1ee4b2addc99b414161f0f707b1913e360 (plain)
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
#!/bin/sh
#
# $FreeBSD$
#
# sample run command file for APM Suspend Event

if [ -r /var/run/rc.suspend.pid ]; then
	exit 1
fi

echo $$ > /var/run/rc.suspend.pid

# If you have troubles on suspending with PC-CARD modem, try this.
# See also contrib/pccardq.c (Only for PAO users).
# pccardq | awk -F '~' '$5 == "filled" && $4 ~ /sio/ \
#	{ printf("pccardc power %d 0", $1); }' | sh

logger -t apmd suspend at `date +'%Y%m%d %H:%M:%S'`
sync && sync && sync
sleep 3

rm -f /var/run/rc.suspend.pid
zzz

exit 0
OpenPOWER on IntegriCloud