This file is indexed.

postinst is in mcollective-plugins-facts-facter 0.0.0~git20120507.df2fa81-0ubuntu1.

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

if [ -f "/etc/mcollective/server.cfg" ]
then
    ucfr -pf mcollective /etc/mcollective/server.cfg
    if [ $(grep "facter" /etc/mcollective/server.cfg | wc -l) = "0" ]
    then
        sed -i -e "/^plugin.yaml/d" -e "s/^factsource.*/factsource = facter/" /etc/mcollective/server.cfg
    fi
    if [ $(grep "fact_cache_time" /etc/mcollective/server.cfg | wc -l) = "0" ]
    then
        sed -i -e "/^plugin.yaml/d" -e "s/^fact_cache_time.*/fact_cache_time = 5/" /etc/mcollective/server.cfg
    fi
    chmod 640 /etc/mcollective/server.cfg
    ucfr mcollective /etc/mcollective/server.cfg
    invoke-rc.d mcollective restart
fi