This file is indexed.

postrm is in uvtool-libvirt 0~bzr92-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
#!/bin/sh
set -e

stop_pool() {
	if virsh -q pool-list|grep -q '^\s*uvtool\s'; then
		# In the postrm virsh may be gone or deconfigured, so ignore
		# failures gracefully.
		virsh -q pool-destroy uvtool || true
	fi
}

undefine_pool() {
	if virsh -q pool-list --all|grep -q '^\s*uvtool\s'; then
		# In the postrm virsh may be gone or deconfigured, so ignore
		# failures gracefully.
		virsh -q pool-undefine uvtool || true
	fi
}

if [ "$1" = purge ]; then
	stop_pool
	undefine_pool
	rm -Rf /var/lib/uvtool/libvirt
fi