summaryrefslogtreecommitdiff
path: root/source/a/smartmontools/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/smartmontools/doinst.sh')
-rw-r--r--source/a/smartmontools/doinst.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/a/smartmontools/doinst.sh b/source/a/smartmontools/doinst.sh
index 82f0ac13..b96297f9 100644
--- a/source/a/smartmontools/doinst.sh
+++ b/source/a/smartmontools/doinst.sh
@@ -10,4 +10,16 @@ config() {
fi
# 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}
+}
+
+preserve_perms etc/rc.d/rc.smartd.new
config etc/smartd.conf.new