~ubuntu-branches/ubuntu/trusty/acpid/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/acpid.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes
  • Date: 2009-11-17 14:50:01 UTC
  • mfrom: (2.1.12 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091117145001-y5hevyg7gcg6uwjk
Tags: 1.0.10-4
Updated netlink patch to version 6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
set -e
4
4
 
5
 
# Remove shutdown and reboot links; this init script does not need them.
6
 
if dpkg --compare-versions "$2" lt "1.0.4-5ubuntu2"; then
7
 
        rm -f /etc/rc0.d/K21acpid /etc/rc6.d/K21acpid
 
5
# Remove old init.d links
 
6
if dpkg --compare-versions "$2" lt-nl "1.0.10-3"; then
 
7
        rm -f /etc/rc1.d/K??acpid
 
8
fi
 
9
 
 
10
if dpkg --compare-versions "$2" lt-nl "1.0.6-16"; then
 
11
        rm -f /etc/rc[06].d/K??acpid
 
12
fi
 
13
 
 
14
if dpkg --compare-versions "$2" lt "1.0.6-6"; then
 
15
        rm -f /etc/rc1.d/K20acpid /etc/rc[2-5].d/S20acpid
8
16
fi
9
17
 
10
18
HAL_NEEDS_RESTARTING=no
11
19
case "$1" in
12
20
  configure|reconfigure)
13
 
    # 
14
 
    if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ -f /var/run/hald/hald.pid ]; then
 
21
    # check whether the hal init script is present and hal seems running; we
 
22
    # need to stop hal to grab /proc/acpi/event; when hal starts again, it will
 
23
    # simply ignore this interface as long as acpid is installed; see
 
24
    # Launchpad #63450
 
25
    if [ -x /etc/init.d/hal ] && [ -f /var/run/hal/hald.pid ]; then
15
26
      HAL_NEEDS_RESTARTING=yes
16
27
      invoke-rc.d hal stop
17
28
    fi
22
33
 
23
34
case "$1" in
24
35
  configure|reconfigure)
25
 
    if [ -x /etc/init.d/hal ]  && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ "$HAL_NEEDS_RESTARTING" = "yes" ]; then
 
36
    if [ -x /etc/init.d/hal ] && [ "$HAL_NEEDS_RESTARTING" = "yes" ]; then
26
37
      invoke-rc.d hal start
27
38
    fi
28
39
    ;;