Subject: /etc/apm/sample
To: None <port-i386@netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: port-i386
Date: 02/02/2000 10:43:55
I thought it would be nice to provide a sample file for
/etc/apm/*, so I'm thinking of adding the following as
/etc/apm/sample. comments?
(I personally needed some time until find out what /etc/apm/* means)
itojun
#! /bin/sh
# $NetBSD$
# This is a sample script for APM daemon - copy it to the following places
# and turn executablebit (chmod 744) to actually use it.
# http://www.netbsd.org/Documentation/power-mgmt/ and apmd(8) have more
# information.
#
# /etc/apm/standby: invoked just before standby mode
# /etc/apm/suspend: invoked just before suspending the machine
# /etc/apm/resume: invoked right after resume
# /etc/apm/line: invoked when switch to AC power
# /etc/apm/battery: invoked when switch to battery power
case `basename $0` in
standby)
;;
suspend)
# power down PCMCIA network devices - this is required to suspend,
# on certain BIOS (including IBM ThinkPad).
# ifconfig sm1 down
;;
resume)
# power up PCMCIA network devices.
# sleep 2
# ifconfig sm1 up
;;
line)
# you may want to enable daemons high disk activity, and/or disable
# idle timer for disk.
# atactl wd0 setidle 0
;;
battery)
# you may want to disable daemons with high disk activity, and/or
# enable idle timer on disk, to save power.
# atactl wd0 setidle 5
;;
esac