diff options
Diffstat (limited to 'system/collectd/doinst.sh')
-rw-r--r-- | system/collectd/doinst.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/system/collectd/doinst.sh b/system/collectd/doinst.sh index bbbfd14f1a..6359977249 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 |