summaryrefslogtreecommitdiff
path: root/debian/nova-common.postrm
blob: ef9b002b083cf55147cd9104a980f0660c970baf (plain)
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
#!/bin/sh

set -e

if [ "$1" = "purge" ] ; then
	if [ -r /usr/share/debconf/confmodule ] ; then
		. /usr/share/debconf/confmodule
		db_get nova/configure_db || true
		if [ "$RET" = "true" ] ; then
			if [ -f /usr/share/dbconfig-common/dpkg/postrm ] ; then
				. /usr/share/dbconfig-common/dpkg/postrm
				dbc_go nova-common $@
			else
				rm -f /etc/dbconfig-common/nova-common.conf
				if which ucf >/dev/null 2>&1; then
					ucf --purge /etc/dbconfig-common/nova-common.conf
					ucfr --purge nova-common /etc/dbconfig-common/nova-common.conf
				fi
			fi
		fi
	fi

	rm -f /var/log/nova/nova-manage.log
	rm -rf /var/lib/nova/CA
	rm -f /var/lib/nova/.rnd
	rm -f /etc/nova/nova.conf
	rm -f /etc/default/nova-common
	rm -f /etc/nova/api-paste.ini
	rm -f /etc/nova/logging.conf
	rmdir --ignore-fail-on-non-empty /etc/nova
fi

#DEBHELPER#

exit 0