aboutsummaryrefslogtreecommitdiff
path: root/system/collectd/doinst.sh
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2013-11-08 13:48:36 +0100
committerMatteo Bernardini <ponce@slackbuilds.org>2013-11-08 17:35:12 +0100
commit1b393452df0547e7ca75ff1e3e74484a82e6072e (patch)
tree8724aaa6e9c68d48f8499fc785dd3d4d950937fb /system/collectd/doinst.sh
parenta1fda691eae13d28a10021c3fcab2f7ffd238c38 (diff)
system/collectd: Updated for version 5.4.0.
Added an rc script, fix for gcc-4.8.x, disabled static stuff Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/collectd/doinst.sh')
-rw-r--r--system/collectd/doinst.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/collectd/doinst.sh b/system/collectd/doinst.sh
index bbbfd14f1af60..6359977249b6e 100644
--- a/system/collectd/doinst.sh
+++ b/system/collectd/doinst.sh
@@ -11,4 +11,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
config etc/collectd.conf.new
+preserve_perms etc/rc.d/rc.collectd.new