diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-06 14:40:02 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-06 14:47:56 -0400 |
commit | 61f7f5cf84c604062b8034deba436f2bddfa340e (patch) | |
tree | 641426c35ff6593a2db50dc4c65199564ce3433b /debian/prerm | |
parent | c732475d89ae616de5ddd2b05190ae15ebce30ba (diff) |
Uninit on purge, guarded by a debconf prompt. Closes: #527218
Diffstat (limited to 'debian/prerm')
-rw-r--r-- | debian/prerm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..806053a --- /dev/null +++ b/debian/prerm @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +if [ "$1" = remove ]; then + # In case etckeeper is being purged, stash away a copy of + # the files purging will need. + mkdir -p /var/cache/etckeeper/stash + if [ -e /etc/etckeeper/etckeeper.conf ]; then + cp -a /etc/etckeeper/etckeeper.conf /var/cache/etckeeper/stash + fi + if [ -d /etc/etckeeper/uninit.d ]; then + cp -a /etc/etckeeper/uninit.d /var/cache/etckeeper/stash + fi + if [ -x /usr/sbin/etckeeper ]; then + cp -a /usr/sbin/etckeeper /var/cache/etckeeper/stash + fi +fi |