This file is indexed.

postinst is in gconf2 3.2.6-4ubuntu1.

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
71
72
73
74
75
76
77
78
#!/bin/sh

set -e

signal_daemons()
{
    # Tell all running daemons to reload their databases
    kill -s HUP `pidof gconfd-2` >/dev/null 2>&1 || true
}

check_for_new_convert_files()
{
    # Check /usr/share/GConf/gsettings to see if there are any new files.
    # We do this by keeping track of the files in that directory since last
    # time we ran, stored in /usr/share/GConf/gsettings.dpkg-cache.
    #
    # If any new files exist, we notify that a reboot is a good idea.
    # We don't worry about updated files, since gsettings-data-convert doesn't.

    convertdir="/usr/share/GConf/gsettings"
    if [ ! -d "$convertdir" ]; then
        return 0
    fi

    cachefile="$convertdir.dpkg-cache"
    newcachefile="$cachefile.new"
    (cd /usr/share/GConf/gsettings; ls -1 * > "$newcachefile" 2>/dev/null)
    if [ ! -e "$cachefile" ] || \
       [ -n "$(comm -1 -3 $cachefile $newcachefile 2>/dev/null)" ]; then
        if [ -x /usr/share/update-notifier/notify-reboot-required ]; then
            /usr/share/update-notifier/notify-reboot-required
        fi
    fi
    mv "$newcachefile" "$cachefile" || true # save for future runs
}

if [ "$1" = triggered ]; then
    for trigger in $2; do
        case $trigger in
            /usr/share/gconf/schemas)
                gconf-schemas --register-all --no-signal
                ;;
            /usr/share/gconf/defaults)
                update-gconf-defaults --no-signal
                ;;
            /usr/share/gconf/mandatory)
                update-gconf-defaults --no-signal --mandatory
                ;;
            /usr/share/GConf/gsettings)
                check_for_new_convert_files
                ;;
        esac
    done
    signal_daemons
    exit 0
fi



for GCONF_DIR in \
                 /etc/gconf/gconf.xml.mandatory \
                 /etc/gconf/gconf.xml.defaults ; do
  GCONF_TREE=$GCONF_DIR/%gconf-tree.xml
  if [ ! -f "$GCONF_TREE" ]; then
    gconf-merge-tree "$GCONF_DIR"
    chmod 644 "$GCONF_TREE"
    find "$GCONF_DIR" -mindepth 1 -maxdepth 1 -type d -exec rm -rf \{\} \;
    rm -f "$GCONF_DIR/%gconf.xml"
  fi
done

# Upon installation/upgrade, regenerate all databases, because in this case 
# there will be no trigger run
gconf-schemas --register-all --no-signal
update-gconf-defaults --no-signal
update-gconf-defaults --no-signal --mandatory
check_for_new_convert_files
signal_daemons