This file is indexed.

postinst is in udev 204-5ubuntu20.

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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/sh
set -e

# Enable udevadm again
enable_udevadm()
{
    if [ -e /bin/udevadm.upgrade ]; then
	    rm -f /bin/udevadm
	    dpkg-divert --package fake-udev --rename --divert /bin/udevadm.upgrade \
			--remove /bin/udevadm
    fi
}

update_hwdb() {
  udevadm hwdb --update || true
}

case "$1" in
    configure)
        # update/create hwdb before we (re)start udev
        update_hwdb

	invoke-rc.d udev restart
	enable_udevadm
	update-initramfs -u
	;;

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

    triggered)
	update_hwdb
	exit 0
	;;

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

# Automatically added by dh_installinit
if [ -x "/etc/init.d/udev" ]; then
	if [ ! -e "/etc/init/udev.conf" ]; then
		update-rc.d udev defaults >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f udev remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/udev-finish" ]; then
	if [ ! -e "/etc/init/udev-finish.conf" ]; then
		update-rc.d udev-finish defaults >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f udev-finish remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/udevtrigger" ]; then
	if [ ! -e "/etc/init/udevtrigger.conf" ]; then
		update-rc.d udevtrigger defaults >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f udevtrigger remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/udevmonitor" ]; then
	if [ ! -e "/etc/init/udevmonitor.conf" ]; then
		update-rc.d udevmonitor defaults >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f udevmonitor remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/udev-fallback-graphics" ]; then
	if [ ! -e "/etc/init/udev-fallback-graphics.conf" ]; then
		update-rc.d udev-fallback-graphics defaults >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f udev-fallback-graphics remove >/dev/null || exit $?
# End automatically added section

exit 0