summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5920c21)
raw | patch | inline | side by side (parent: 5920c21)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 17 May 2012 15:10:00 +0000 (17:10 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 17 May 2012 15:11:35 +0000 (17:11 +0200) |
This provides an option to keep the data. The question (debconf priority high)
defaults to remove the data
Closes: #631167
defaults to remove the data
Closes: #631167
debian/changelog | patch | blob | history | |
debian/collectd-core.postrm | patch | blob | history | |
debian/collectd-core.templates | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index 6e9630b2b52f531ab562c9ff070d7a6d8b4ac6f6..c36ac7d870351a14b4bce04f05899cbca6c9e020 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
out-dated data files (e.g. RRD files).
* debian/control:
- Updated to standards-version 3.9.3 -- no changes.
+ * debian/collectd-core.postrm, debian/collectd-core.templates:
+ - Prompt the user (debconf priority high) when purging the collected data
+ providing an option to opt out. The question defaults to remove the
+ data; thanks to Trent W. Buck for reporting and discussing this
+ (Closes: #631167).
-- Sebastian Harl <tokkee@debian.org> Thu, 17 May 2012 15:55:39 +0200
index 23ce1545a9c9279115d48e8d9902a2ebef773bb5..cdeabe48b57c354aa31f2c528ee0dbe68000798a 100755 (executable)
case "$1" in
purge)
- rm -rf /var/lib/collectd
+ db_input high collectd/postrm_purge_data || true
+ db_go || true
+ db_get collectd/postrm_purge_data || true
+ if [ "$RET" = "true" ]; then
+ rm -rf /var/lib/collectd
+ fi
rm -rf /etc/collectd
;;
-
+
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
index 089e18ffbbacd667ed655155f25c0363915bb4ae..e727097847fe875751adbc6785c7e5e810d0ce6f 100644 (file)
.
See /usr/share/doc/collectd-core/NEWS.Debian for details.
+Template: collectd/postrm_purge_data
+Type: boolean
+Default: true
+_Description: Remove all collected data (e.g. RRD files)?
+ The /var/lib/collectd/ directory which contains the data files containing the
+ collected statistics is about to be removed. For example, this directory
+ includes (in the default configuration) all RRD files.
+ .
+ If you're purging the collectd package in order to replace it with a more
+ recent or custom version or if you want to keep the data for further
+ analysis, the data should be kept.
+