This file is indexed.

preinst is in module-init-tools 15-0ubuntu6.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh -e

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 -- "$@"
dpkg-maintscript-helper rm_conffile /etc/init/module-init-tools.conf 9-2ubuntu5 -- "$@"

rm_conffile() {
  mv_conffile "$1" "$1.dpkg-bak"
}

mv_conffile() {
  local package='module-init-tools'
  local name="$1"
  local newname="$2"

  [ -e "$name" ] || return 0

  local md5="$(md5sum $name | sed -e 's/ .*//')"
  oldmd5="$(dpkg-query -W -f='${Conffiles}' $package | \
    sed -n -e "\' $name ' { s/ obsolete$//; s/.* //; p }")"

  if [ "$md5" = "$oldmd5" ]; then
    rm -f "$name"
  else
    mv "$name" "$newname"
  fi
}

upgrade_quirks() {
  # $2 is non-empty when installing from the "config-files" state
  [ "$2" ] || return 0

  if dpkg --compare-versions $2 lt 3.10-3; then
  if dpkg --compare-versions $2 lt 3.3-pre11-4; then

  echo 'Upgrading from packages older than 3.3-pre11-4 is not supported.'
  echo 'Please purge module-init-tools before installing this package.'
  echo '(But remember to keep a copy of /etc/modules!)'
  exit 1

  fi # lt 3.1-pre11-1

  for file in i386 x86_64 mips s390 parisc sparc powerpc.apus \
       powerpc.generic powerpc.pmac m68k.amiga m68k.atari m68k.generic; do
    rm_conffile /etc/modprobe.d/arch/$file
  done
  rmdir /etc/modprobe.d/arch/ 2> /dev/null || true
  if [ -L /etc/modprobe.d/arch-aliases \
      -a ! -e /etc/modprobe.d/arch-aliases ]; then
    rm /etc/modprobe.d/arch-aliases
  fi

  mv_conffile /etc/modprobe.d/aliases /etc/modprobe.d/aliases.conf

  fi # lt 3.10-3
}

case "$1" in
  install|upgrade) upgrade_quirks "$@" ;;
esac



exit 0