This file is indexed.

postinst is in mysql-common 5.7.25-0ubuntu0.16.04.2.

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
#!/bin/sh
set -e

# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/mysql/conf.d/.keepme 5.6.22-1~ mysql-common -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/mysql/my.cnf 5.6.22-1~ mysql-common -- "$@"
# End automatically added section


# This code needs to go after the debhelper snippets so that it runs after
# dpkg-maintscript-helper rm_conffile on /etc/mysql/my.cnf. As a one off, if
# my.cnf.dpkg-bak exists after this stage then we rename it to
# /etc/mysql/my.cnf.migrated, add an explanatory note to the top and add it is
# a high priority alternative so it gets used in favour of any other my.cnf
# shipped by variants. The /etc/mysql/my.cnf.migrated file will not be owned by
# any package (just like /etc/mysql/my.cnf.dpkg-bak would have been) but we
# rename it since it will be in active use, the user may not expect a .dpkg-bak
# file to be in use and we do not want to surprise the user.

if [ "$1" = "configure" ]; then
    # Low priority fallback for client use when no server is installed.
    update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.fallback 100
fi

if [ "$1" = "configure" -a -f /etc/mysql/my.cnf.dpkg-bak ] && dpkg --compare-versions "$2" le "5.6.19-1~exp1ubuntu2~"; then
    echo "Moving /etc/mysql/my.cnf.dpkg-bak to /etc/mysql/my.cnf.migrated"
    cat - /etc/mysql/my.cnf.dpkg-bak <<EOT > /etc/mysql/my.cnf.migrated
# This file has been automatically moved from your previous
# /etc/mysql/my.cnf, with just this comment added at the top, to maintain MySQL
# operation using your previously customised configuration.

# To switch to the new packaging configuration for automated management of
# /etc/mysql/my.cnf across multiple variants:
#
# 1. Move your customisations from this file to /etc/mysql/conf.d/ and
#    to /etc/mysql/<variant>.conf.d/ as appropriate.
# 2. Run "update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated"
# 3. Remove the file /etc/mysql/my.cnf.migrated

EOT
    rm /etc/mysql/my.cnf.dpkg-bak
    echo "Using your previous configuration through /etc/mysql/my.cnf.migrated"
    update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.migrated 300
fi