Put apmd configuration and rc files in /etc.
Update some files for apmd.
This commit is contained in:
parent
07c279cd0d
commit
701279af09
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48734
@ -109,6 +109,7 @@
|
||||
#
|
||||
# Special purpose devices:
|
||||
# apm Advanced Power Management BIOS
|
||||
# apmctl APM BIOS control device
|
||||
# bpf* packet filter
|
||||
# speaker pc speaker
|
||||
# tw* xten power controller
|
||||
@ -130,7 +131,7 @@
|
||||
# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
|
||||
# kbd keyboard devices
|
||||
#
|
||||
# $Id: MAKEDEV,v 1.204 1999/07/09 13:37:58 sheldonh Exp $
|
||||
# $Id: MAKEDEV,v 1.205 1999/07/09 21:35:17 phk Exp $
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
|
||||
@ -236,7 +237,7 @@ all)
|
||||
sh MAKEDEV ums0 ulpt0 ugen0 # cdev, USB devices
|
||||
sh MAKEDEV bpf0 ipl tun0 # cdev, network
|
||||
sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous
|
||||
sh MAKEDEV apm card0 card1 card2 card3 # cdev, laptop
|
||||
sh MAKEDEV apm apmctl card0 card1 card2 card3 # cdev, laptop
|
||||
sh MAKEDEV pass4 xpt2 # cdev, CAM
|
||||
sh MAKEDEV i4b i4bctl i4btrc0 i4btrc1 # cdev, ISDN
|
||||
sh MAKEDEV i4btel0 i4btel1 i4bteld0 i4bteld1 # cdev, ISDN
|
||||
@ -1219,8 +1220,11 @@ gsc*)
|
||||
apm*)
|
||||
chr=39
|
||||
mknod apm c $chr 0
|
||||
mknod apmctl c $chr 8
|
||||
chgrp operator apm
|
||||
chgrp operator apmctl
|
||||
chmod 660 apm
|
||||
chmod 660 apmctl
|
||||
;;
|
||||
|
||||
card*)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
|
||||
# $Id: Makefile,v 1.199 1999/06/24 09:45:17 sheldonh Exp $
|
||||
# $Id: Makefile,v 1.200 1999/07/09 05:30:33 obrien Exp $
|
||||
|
||||
SUBDIR= sendmail
|
||||
|
||||
@ -7,6 +7,7 @@ BIN1= aliases amd.map auth.conf crontab csh.cshrc csh.login csh.logout \
|
||||
dhclient.conf dm.conf fbtab ftpusers gettytab group hosts hosts.allow \
|
||||
host.conf hosts.equiv hosts.lpd inetd.conf login.access login.conf \
|
||||
motd modems networks newsyslog.conf pam.conf pccard.conf.sample \
|
||||
apmd.conf \
|
||||
phones printcap profile protocols rc rc.atm rc.devfs rc.diskless1 \
|
||||
rc.diskless2 rc.firewall rc.isdn rc.network rc.pccard rc.serial \
|
||||
rc.shutdown etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} remote security \
|
||||
@ -17,7 +18,7 @@ BIN1= aliases amd.map auth.conf crontab csh.cshrc csh.login csh.logout \
|
||||
${.CURDIR}/../usr.bin/locate/locate/locate.rc
|
||||
|
||||
# -rwxr-xr-x root.wheel, for the new cron root.wheel
|
||||
BIN2= netstart pccard_ether
|
||||
BIN2= netstart pccard_ether rc.suspend rc.resume
|
||||
|
||||
MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
|
||||
BSD.var.dist BSD.x11.dist
|
||||
|
38
etc/apmd.conf
Normal file
38
etc/apmd.conf
Normal file
@ -0,0 +1,38 @@
|
||||
# apmd Configration File
|
||||
#
|
||||
# $Id: apmd.conf,v 1.1.1 1999/07/09 01:34:57 iwasaki Exp $
|
||||
#
|
||||
|
||||
apm_event SUSPENDREQ {
|
||||
exec "/etc/rc.suspend";
|
||||
}
|
||||
|
||||
apm_event USERSUSPENDREQ {
|
||||
exec "sync && sync && sync";
|
||||
exec "sleep 1";
|
||||
exec "apm -z";
|
||||
}
|
||||
|
||||
apm_event NORMRESUME, STANDBYRESUME {
|
||||
exec "/etc/rc.resume";
|
||||
}
|
||||
|
||||
# resume event configuration for serial mouse users by
|
||||
# reinitializing a moused(8) connected to a serial port.
|
||||
#
|
||||
#apm_event NORMRESUME {
|
||||
# exec "kill -HUP `cat /var/run/moused.pid`";
|
||||
#}
|
||||
|
||||
# suspend request event configuration for ATA HDD users:
|
||||
# execute standby instead of suspend.
|
||||
#
|
||||
#apm_event SUSPENDREQ {
|
||||
# reject;
|
||||
# exec "sync && sync && sync";
|
||||
# exec "sleep 1";
|
||||
# exec "apm -Z";
|
||||
#}
|
||||
|
||||
# apmd Configration ends here
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.i386,v 1.38 1999/01/29 18:09:38 yokota Exp $
|
||||
# $Id: rc.i386,v 1.39 1999/01/30 07:22:29 newton Exp $
|
||||
# Do i386 specific processing
|
||||
#
|
||||
|
||||
@ -10,6 +10,10 @@ if [ "X$apm_enable" = X"YES" ] ; then
|
||||
apmconf -e > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "X$apmd_enable" = X"YES" ] ; then
|
||||
echo -n ' apmd'; apmd
|
||||
fi
|
||||
|
||||
# Start the SCO binary emulation if requested.
|
||||
if [ "X${ibcs2_enable}" = X"YES" ]; then
|
||||
echo -n ' ibcs2'; ibcs2 > /dev/null 2>&1
|
||||
|
@ -109,6 +109,7 @@
|
||||
#
|
||||
# Special purpose devices:
|
||||
# apm Advanced Power Management BIOS
|
||||
# apmctl APM BIOS control device
|
||||
# bpf* packet filter
|
||||
# speaker pc speaker
|
||||
# tw* xten power controller
|
||||
@ -130,7 +131,7 @@
|
||||
# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
|
||||
# kbd keyboard devices
|
||||
#
|
||||
# $Id: MAKEDEV,v 1.204 1999/07/09 13:37:58 sheldonh Exp $
|
||||
# $Id: MAKEDEV,v 1.205 1999/07/09 21:35:17 phk Exp $
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
|
||||
@ -236,7 +237,7 @@ all)
|
||||
sh MAKEDEV ums0 ulpt0 ugen0 # cdev, USB devices
|
||||
sh MAKEDEV bpf0 ipl tun0 # cdev, network
|
||||
sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous
|
||||
sh MAKEDEV apm card0 card1 card2 card3 # cdev, laptop
|
||||
sh MAKEDEV apm apmctl card0 card1 card2 card3 # cdev, laptop
|
||||
sh MAKEDEV pass4 xpt2 # cdev, CAM
|
||||
sh MAKEDEV i4b i4bctl i4btrc0 i4btrc1 # cdev, ISDN
|
||||
sh MAKEDEV i4btel0 i4btel1 i4bteld0 i4bteld1 # cdev, ISDN
|
||||
@ -1219,8 +1220,11 @@ gsc*)
|
||||
apm*)
|
||||
chr=39
|
||||
mknod apm c $chr 0
|
||||
mknod apmctl c $chr 8
|
||||
chgrp operator apm
|
||||
chgrp operator apmctl
|
||||
chmod 660 apm
|
||||
chmod 660 apmctl
|
||||
;;
|
||||
|
||||
card*)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.i386,v 1.38 1999/01/29 18:09:38 yokota Exp $
|
||||
# $Id: rc.i386,v 1.39 1999/01/30 07:22:29 newton Exp $
|
||||
# Do i386 specific processing
|
||||
#
|
||||
|
||||
@ -10,6 +10,10 @@ if [ "X$apm_enable" = X"YES" ] ; then
|
||||
apmconf -e > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "X$apmd_enable" = X"YES" ] ; then
|
||||
echo -n ' apmd'; apmd
|
||||
fi
|
||||
|
||||
# Start the SCO binary emulation if requested.
|
||||
if [ "X${ibcs2_enable}" = X"YES" ]; then
|
||||
echo -n ' ibcs2'; ibcs2 > /dev/null 2>&1
|
||||
|
23
etc/rc.resume
Executable file
23
etc/rc.resume
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: rc.resume,v 1.1.1 1999/07/09 01:34:57 iwasaki Exp $
|
||||
#
|
||||
# sample run command file for APM Resume Event
|
||||
|
||||
if [ -f /var/run/rc.suspend.pid ]
|
||||
then
|
||||
kill -9 `cat /var/run/rc.suspend.pid`
|
||||
rm -f /var/run/rc.suspend.pid
|
||||
echo rc.suspend is killed
|
||||
fi
|
||||
|
||||
# Turns on a power supply of a card in the slot inactivated.
|
||||
# See also contrib/pccardq.c (only for PAO users).
|
||||
#pccardq | awk -F '~' '$5 == "inactive" \
|
||||
# { printf("pccardc power %d 1", $1); }' | sh
|
||||
|
||||
logger -t apmd resumed at `date +'%Y%m%d %H:%M:%S'`
|
||||
sync && sync && sync
|
||||
|
||||
exit 0
|
||||
|
27
etc/rc.suspend
Executable file
27
etc/rc.suspend
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: rc.suspend,v 1.1.1 1999/07/09 01:34:57 iwasaki Exp $
|
||||
#
|
||||
# sample run command file for APM Suspend Event
|
||||
|
||||
if [ -f /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
|
||||
|
Loading…
Reference in New Issue
Block a user