File: module-init-tools.postinst

package info (click to toggle)
kmod 9-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,808 kB
  • sloc: ansic: 12,151; sh: 11,490; xml: 1,605; makefile: 329
file content (35 lines) | stat: -rw-r--r-- 958 bytes parent folder | download | duplicates (2)
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
#!/bin/sh -e

replace_mit_part2() {
  dpkg-maintscript-helper rm_conffile /etc/init.d/module-init-tools 3.16-1 -- "$@"
  dpkg-maintscript-helper rm_conffile /etc/modprobe.d/aliases.conf 3.16-1 -- "$@"

  if [ -d /usr/share/doc/module-init-tools -a \
      ! -L /usr/share/doc/module-init-tools ]; then
    rmdir /usr/share/doc/module-init-tools
    ln -s /usr/share/doc/libkmod2 /usr/share/doc/module-init-tools
  fi

  if [ -e /etc/modprobe.d/aliases.conf.dpkg-bak ]; then
    {
      cat <<END
### This file was preserved when module-init-tools was replaced by kmod,
### because it contained local modifications.
### Please review this file and remove everything which duplicates the
### contents of /lib/modprobe.d/aliases.conf.

END
      cat /etc/modprobe.d/aliases.conf.dpkg-bak
    } > /etc/modprobe.d/aliases-m-i-t.conf
    rm /etc/modprobe.d/aliases.conf.dpkg-bak
  fi
}

case "$1" in
  configure)
  replace_mit_part2 "$@"
esac

#DEBHELPER#

exit 0