This file is indexed.

preinst is in powernap 2.21-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
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
#!/bin/sh

set -e

# Backup old confile
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.0; then
	if [ -f /etc/powernap/config ]; then
		if md5sum /etc/powernap/config | grep -qs def76ff408c21dc74683a05d7c5fcc5a; then
			true
		else
			mv -f /etc/powernap/config /etc/powernap/config.old
			echo "PowerNap: The configuration format has changed"
			echo "Powernap: Moved /etc/powernap/config to /etc/powernap/config.old"
			echo "PowerNap: You may need to merge your customizations into /etc/powernap/config"
		fi
	fi
fi

# can be removed after 16.04 LTS
DEFAULT_FILE=/etc/default/powernap
if [ "$1" = upgrade ]; then

    if [ -f $DEFAULT_FILE ] && egrep -sqi 'START="?yes' $DEFAULT_FILE; then
        # once the override file is installed, we'll remove it to reenable the upstart job
        touch ${DEFAULT_FILE}.enable
    fi

fi

# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
	if [ -e "/etc/init.d/powernap" ] && [ -L "/etc/init.d/powernap" ] \
	   && [ $(readlink -f "/etc/init.d/powernap") = /lib/init/upstart-job ]
	then
		rm -f "/etc/init.d/powernap"
	fi
fi
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/default/powernap 2.19~ -- "$@"
# End automatically added section


exit 0