# breezed is a fan speed control daemon for Linux computers.
#
-# Copyright (c) 2008 Francois Fleuret
+# Copyright (c) 2009 Francois Fleuret
# Written by Francois Fleuret <francois@fleuret.org>
#
# This file is part of breezed.
# You should have received a copy of the GNU General Public License
# along with breezed. If not, see <http://www.gnu.org/licenses/>.
+# This file should be copied into /usr/lib/pm-utils/sleep.d/50breezed
+
case "$1" in
hibernate|suspend)
cp ./breezed /usr/local/bin/
cp ./breezed.sh /etc/init.d/
-cp ./breezed-resume.sh /etc/acpi/resume.d/99-breezed.sh
-cp ./breezed-suspend.sh /etc/acpi/suspend.d/01-breezed.sh
+cp ./breezed-pm-utils.sh /usr/lib/pm-utils/sleep.d/50breezed
cp ./breezed.1 /usr/share/man/man1/
update-rc.d breezed.sh defaults
update-rc.d -f breezed.sh remove
-rm /usr/share/man/man1/breezed.1
rm /usr/local/bin/breezed
rm /etc/init.d/breezed.sh
-rm /etc/acpi/resume.d/99-breezed.sh
-rm /etc/acpi/suspend.d/01-breezed.sh
+rm /usr/lib/pm-utils/sleep.d/50breezed
+rm /usr/share/man/man1/breezed.1
+
+# rm /etc/acpi/resume.d/99-breezed.sh
+# rm /etc/acpi/suspend.d/01-breezed.sh