This file is indexed.

postinst is in libmtp9 1.1.10-2ubuntu1.

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
#!/bin/sh
# postinst script for libmtp

set -e

PACKAGE=libmtp9

case "$1" in
configure)
    # PART A: Remove broken link (0.3.7-3 upgrade, bug #527206)
    oldlink=/etc/udev/rules.d/libmtp8.rules
    if [ -L $oldlink -a ! -f $oldlink ] ; then
        rm -f $oldlink
    fi

    # PART B: Remove broken link, libmtp5 leftover (bug #531538)
    oldlink2=/etc/udev/rules.d/libmtp.rules
    if [ -L $oldlink2 -a ! -f $oldlink2 ] ; then
        rm -f $oldlink2
    fi
    
    # PART C: Remove broken link, libmtp7 leftover
    oldlink3=/etc/udev/rules.d/libmtp7.rules
    if [ -L $oldlink3 -a ! -f $oldlink3 ] ; then
        rm -f $oldlink3
    fi

    # PART D
    # Check if package version is 0.3.7-3 or less
    # Do not mix with package-default rules file: /lib/udev/rules.d/libmtp8.rules
    # If rules file is in /etc/udev/, move it to correct path /etc/udev/rules.d/ 
    # and with 45- prefix.
    dpkg-maintscript-helper mv_conffile \
        /etc/udev/$PACKAGE.rules /etc/udev/rules.d/45-$PACKAGE.rules \
            0.3.7-3 libmtp8 -- "$@"
esac



exit 0