This file is indexed.

postinst is in qemu-kvm 1.0+noroms-0ubuntu14.31.

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

if [ "$1" = configure ]; then
    # Clean up old kvm confiles from jaunty-era kvm
    if [ -n "$2" ] && dpkg --compare-versions "$2" lt 0.12.3-0ubuntu6; then
	for i in "/lib/udev/rules.d/45-kvm.rules" "/etc/init.d/kvm" "/etc/kvm/kvm-ifup"; do
		[ -f "$i" ] && rm -f "$i" || true
	done
    fi
fi

# Automatically added by dh_installinit
if [ -e "/etc/init/qemu-kvm.conf" ]; then
	invoke-rc.d qemu-kvm start || true
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f qemu-kvm remove >/dev/null || true
# End automatically added section
# Automatically added by dh_installudev
if [ "$1" = configure ]; then
	if [ -e "/etc/udev/rules.d/45_qemu-kvm.rules" ]; then
		echo "Preserving user changes to /etc/udev/rules.d/45-qemu-kvm.rules ..."
		if [ -e "/etc/udev/rules.d/45-qemu-kvm.rules" ]; then
			mv -f "/etc/udev/rules.d/45-qemu-kvm.rules" "/etc/udev/rules.d/45-qemu-kvm.rules.dpkg-new"
		fi
		mv -f "/etc/udev/rules.d/45_qemu-kvm.rules" "/etc/udev/rules.d/45-qemu-kvm.rules"
	fi
fi
# End automatically added section


# Remove group::--- acl mistakenly placed on /dev/kvm by udev-acl
if [ -c /dev/kvm -a ! -L /dev/kvm ]
then
  /usr/bin/setfacl -m g::rw /dev/kvm
fi


# We've added new udev rules for /dev/kvm, so if kvm module is already loaded,
# make udev recalculate owner/perms.
udevadm trigger --subsystem-match=misc --action=change

exit 0