3 # $NetBSD: script,v 1.4 2000/11/05 03:30:51 lukem Exp $
7 # Link this script to /etc/apm/{suspend,standby,resume,line,battery}
8 # to play some sounds on suspend/resume, and enable/shutdown the
12 # cp script /etc/apm/suspend
14 # for i in standby resume line battery ; do ln suspend $i ; done
15 # chmod a+x suspend standby resume line battery
17 # See apmd(8) for more information.
21 PATH
=/usr
/pkg
/bin
:/sbin
:$PATH
24 # Where some sound files are stored:
25 S
=/usr
/X11R
6/share
/kde
/sounds
27 # What my network card's recognized as:
30 LOGGER
='logger -t apm'
35 audioplay
-q -f -s 22050 -c 1 $1
41 $LOGGER 'Suspending...'
42 noise
$S/KDE_Window_UnMaximize.wav
43 # In case some NFS mounts still exist - we don't want them to hang:
47 sh
/etc
/rc.d
/dhclient stop
48 $LOGGER 'Suspending done.'
52 $LOGGER 'Going to standby mode ....'
53 noise
$S/KDE_Window_UnMaximize.wav
54 # In case some NFS mounts still exist - we don't want them to hang:
58 sh
/etc
/rc.d
/dhclient stop
59 $LOGGER 'Standby done.'
64 noise
$S/KDE_Startup.wav
65 sh
/etc
/rc.d
/dhclient start
68 $LOGGER 'Resuming done.'
72 # noise $S/KDE_Window_DeIconify.wav
73 $LOGGER 'Running on power line.'
74 mount
-u -o atime
,devmtime
-A -t ffs
79 # noise $S/KDE_Window_DeIconify.wav
80 $LOGGER 'Running on battery.'
81 mount
-u -o noatime
,nodevmtime
-A -t ffs