~tjaalton/acpi-support/precise

« back to all changes in this revision

Viewing changes to debian/preinst

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek, Steve Langasek, Michael Terry
  • Date: 2009-06-26 15:41:38 UTC
  • Revision ID: james.westby@ubuntu.com-20090626154138-4fzkytv5xqxt9aes
Tags: 0.124
[ Steve Langasek ]
* Drop events/sony-eject, confirmed in bug reports to no longer work due
  to its use of acpi_fakekey.  This needs to be implemented in the kernel
  input layer, but in the meantime there's no reason to keep this here.
  LP: #76924.
* Drop events/panasonic-{hibernatebtn,sleepbtn}, also reported to not work
  now due to the acpi_fakekey implementation.

[ Michael Terry ]
* debian/copyright: Convert to DEP5 format
* ac.d, battery.d, power.sh, debian/init.d, debian/rules:
  - Don't install power hook directories, instead just call pm-powersave
* debian/preinst:
  - Remove ac.d and battery.d conffiles

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    fi
19
19
}
20
20
 
 
21
rm_confdir() {
 
22
    DIRNAME="$1"
 
23
    if [ -d "$DIRNAME" ]; then
 
24
        rmdir --ignore-fail-on-non-empty "$DIRNAME"
 
25
    fi
 
26
}
21
27
 
22
28
case "$1" in
23
29
install|upgrade)
98
104
        rm_conffile acpi-support /etc/acpi/suspend.d/75-console-switch.sh
99
105
        rm_conffile acpi-support /etc/acpi/suspend.d/85-alsa-state.sh
100
106
        rm_conffile acpi-support /etc/acpi/suspend.d/90-framebuffer-stop.sh
101
 
        if [ -d /etc/acpi/resume.d ]; then
102
 
                rmdir --ignore-fail-on-non-empty /etc/acpi/resume.d
103
 
        fi
104
 
        if [ -d /etc/acpi/suspend.d ]; then
105
 
                rmdir --ignore-fail-on-non-empty /etc/acpi/suspend.d
106
 
        fi
 
107
        rm_confdir /etc/acpi/resume.d
 
108
        rm_confdir /etc/acpi/suspend.d
107
109
        rm_conffile acpi-support /etc/acpi/prepare.sh
108
110
        rm_conffile acpi-support /etc/acpi/resume.sh
109
111
    fi
112
114
        rm_conffile acpi-support /etc/acpi/events/asus-volume-up
113
115
        rm_conffile acpi-support /etc/acpi/events/asus-volume-mute
114
116
    fi
 
117
    if dpkg --compare-versions "$2" lt-nl "0.124"; then
 
118
        rm_conffile acpi-support /etc/acpi/events/sony-eject
 
119
        rm_conffile acpi-support /etc/acpi/events/panasonic-hibernatebtn
 
120
        rm_conffile acpi-support /etc/acpi/events/panasonic-sleepbtn
 
121
        rm_conffile acpi-support /etc/acpi/ac.d/90-hdparm.sh
 
122
        rm_conffile acpi-support /etc/acpi/battery.d/90-hdparm.sh
 
123
        rm_confdir /etc/acpi/ac.d
 
124
        rm_confdir /etc/acpi/battery.d
 
125
    fi
115
126
esac
116
127
 
117
128