File: postrm.sed

package info (click to toggle)
thinkpad 5.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 604 kB
  • ctags: 1,459
  • sloc: ansic: 5,985; makefile: 226; sh: 179; asm: 44; sed: 22
file content (43 lines) | stat: -rw-r--r-- 1,000 bytes parent folder | download
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
#!/bin/sh
set -e

#DEBHELPER#

case "${1}" in
  remove)
    if [ `uname -r` = "$KVERS" ]; then
      # This was the module package for the running kernel
      # Try to unload the driver modules.
      modprobe -r thinkpadpm || true
      modprobe -r rtcmosram || true
      modprobe -r superio || true
      modprobe -r smapi || true
      modprobe -r thinkpad || true
      # Update dependency file
      depmod -a || true
    fi
    ;;

  upgrade)
    if [ `uname -r` = "$KVERS" ]; then
      # This was the module package for the running kernel
      # Try to unload the driver modules.
      modprobe -r thinkpadpm || true
      modprobe -r rtcmosram || true
      modprobe -r superio || true
      modprobe -r smapi || true
      modprobe -r thinkpad || true
      # Don't update dependency file -- new postinst will do it.
    fi
    ;;

  purge)
    ;;

  failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;
  *)
    echo "postrm called with unknown argument \`$1'" >&2
    ;;
esac