This file is indexed.

postinst is in im-config 0.29-1ubuntu12.

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
65
66
67
68
69
70
#!/bin/sh
# postinst script for im-config
# vim: set sts=4 expandtab:

set -e

# version just before wheezy release
# acb685ae9264be3fc1800f98a70b12bb  80im-switch 1.14
# 044a2f13aa8382902dc8f47dc7da7064  80im-switch 1.16 (oldstable) - 1.22 (unstable)
# 5b34831bb3c203ced71b7efb6da4609e  80im-switch 1.23 (testing/unstable)

# 4045a8eeb0e9226cdd9f8a121ccf4c04  80im-config_launch 0.3 (stable initial)
# 8a4829f935b5561ca6e61bec6eb3893f  80im-config_launch 0.3+squeeze1 (stable), 0.4
# b243876a16f7b87c397ceef626098069  80im-config_launch 0.5
# 5ef27261ac38d704d8f766da19635461  80im-config_launch 0.6-0.17 (testing, unstable)

case "$1" in
    configure)
        IM_SWITCH_HOOK=/etc/X11/Xsession.d/80im-switch
        IM_SWITCH_DISABLE_CODE='[ -x /usr/bin/im-switch ] || return 0'
        if [ -f $IM_SWITCH_HOOK ]; then
            IM_SWITCH_HOOK_MD5SUM=$(md5sum < $IM_SWITCH_HOOK|cut -d ' ' -f 1)
            case $IM_SWITCH_HOOK_MD5SUM in
                acb685ae9264be3fc1800f98a70b12bb|044a2f13aa8382902dc8f47dc7da7064|5b34831bb3c203ced71b7efb6da4609e)
                    rm -f $IM_SWITCH_HOOK
                ;;
    
                *)
                    if [ "$( head -1 $IM_SWITCH_HOOK )" != "$IM_SWITCH_DISABLE_CODE" ];then
                        echo "Migrating from im-switch to im-config. Disabling: $IM_SWITCH_HOOK." >&2
                        sed -i "1 i $IM_SWITCH_DISABLE_CODE" $IM_SWITCH_HOOK
                    fi
                ;;
            esac
        fi
        IM_CONFIG_HOOK=/etc/X11/Xsession.d/80im-config_launch
        if [ -f $IM_CONFIG_HOOK ]; then
            IM_CONFIG_HOOK_MD5SUM=$(md5sum < $IM_CONFIG_HOOK|cut -d ' ' -f 1)
            case $IM_CONFIG_HOOK_MD5SUM in
                4045a8eeb0e9226cdd9f8a121ccf4c04|8a4829f935b5561ca6e61bec6eb3893f|b243876a16f7b87c397ceef626098069|5ef27261ac38d704d8f766da19635461)
                    rm -f $IM_CONFIG_HOOK
                ;;
    
                *)
                    echo "ERROR: Unknown hook file exists: $IM_CONFIG_HOOK." >&2
                ;;
            esac
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section


exit 0