This file is indexed.

postinst is in libuuid1 2.27.1-6ubuntu3.

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

##########################################################################
# This is a partial copy of uuid-runtime.postinst just to make sure      #
# everyone gets their user renamed (even if they don't have uuid-runtime #
# installed).  This package used to create the user in the first place,  #
# but no longer uses it and all handling has been moved to uuid-runtime. #
# This (entire file?) should be dropped after this code has shipped in a #
# Debian Stable release (so we know everyone has been migrated).         #
##########################################################################

# upgrade existing libuuid user/group.
if getent group libuuid >/dev/null && ! getent group uuidd >/dev/null ; then
	groupmod --new-name uuidd libuuid
fi
if getent passwd libuuid >/dev/null && ! getent passwd uuidd >/dev/null ; then
	# attempt to stop potentially running uuidd, otherwise usermod will fail.
	invoke-rc.d --quiet uuidd stop || true

	# rename user, change shell and set new homedir.
	usermod --login uuidd --shell /bin/false --home /run/uuidd libuuid

	# attemp cleanup of old home directory.
	[ -d /var/lib/libuuid ] && \
		rmdir --ignore-fail-on-non-empty /var/lib/libuuid || true
fi