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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#! /bin/sh
set -e
if [ "$1" = "configure" ]; then
# register devices
if [ -e /dev/.devfsd ]; then # devfs enabled
update-devfsd > /dev/null 2>&1 || true
else # devfs not enabled
# /dev/pmu device to interface with kernel PMU code
if [ ! -c /dev/pmu ]; then
mknod /dev/pmu c 10 154
chmod 600 /dev/pmu
fi
# /dev/apm_bios device to tell XFree86 there's power management of some sort (hack)
if [ ! -c /dev/apm_bios ]; then
mknod /dev/apm_bios c 10 134
chmod 660 /dev/apm_bios
fi
fi
# APM compatibility fifo; use /proc/apm if possible
if [ ! -p /etc/power/apm ]; then
mkfifo -m 644 /etc/power/apm
fi
fi
update-rc.d pmud defaults 40 60
#DEBHELPER#
if [ "$1" = "configure" ]; then
if ! grep -q "PowerBook" /proc/cpuinfo ; then
cat <<EOM
Important notice:
=================
You are installing the pmud power management daemon on a desktop PowerPC
model. pmud is intended for use on Apple Powerbook models only. Using pmud
or its helper tools to switch to sleep mode on your desktop machine may
cause the system to hang (this is not a bug!). It may, accidentially, work
as expected on some models (undocumented feature). You have been warned.
If you feel comfortable with pmud operating on your system, fine. Otherwise
please remove the pmud package from your system as soon as possible.
EOM
read -p "* Press return to continue" foo
fi
fi
if [ "$1" = "configure" -a ! -f /var/run/pmud.pid ]; then
if [ -x /usr/sbin/invoke-rc.d ]
then
invoke-rc.d pmud start
else
/etc/init.d/pmud start
fi
fi
exit 0
|