summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e74ae4)
raw | patch | inline | side by side (parent: 4e74ae4)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 1 May 2007 21:10:42 +0000 (23:10 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 2 May 2007 18:00:53 +0000 (18:00 +0000) |
* hostname should only default to "localhost" if hostname(1) returned the
empty string
* move new DataDir to /var/lib/collectd/rrd instead of /var/lib/collectd/
empty string
* move new DataDir to /var/lib/collectd/rrd instead of /var/lib/collectd/
debian/collectd.postinst | patch | blob | history |
index 82cfa51eaee73deeaab1e3b74f7bb51cd148716f..b9b5b142b95e2619348ff17936e9035b476ff7f8 100755 (executable)
--- a/debian/collectd.postinst
+++ b/debian/collectd.postinst
db_get collectd/auto-migrate-3-4
if [ "$RET" = "true" ]; then
tmpdir=`mktemp -dt collectd.XXXXXXXXXX`
+ hostname=`hostname`
+
+ if [ -z "$hostname" ]; then hostname="localhost"; fi
cp -a /var/lib/collectd/ /var/backups/collectd-"$2"
- /usr/lib/collectd/utils/migrate-3-4.px -o $tmpdir | bash
+ /usr/lib/collectd/utils/migrate-3-4.px \
+ --hostname="$hostname" --outdir="$tmpdir" | bash
rm -rf /var/lib/collectd/
- mv $tmpdir /var/lib/collectd/
+ mkdir /var/lib/collectd/
+ mv $tmpdir /var/lib/collectd/rrd
fi
;;