summaryrefslogtreecommitdiffstats
path: root/system/glyptodon/doinst.sh
diff options
context:
space:
mode:
author Menno Duursma <druiloor@zonnet.nl>2010-10-21 00:05:41 +0100
committer Michiel van Wessem <michiel@slackbuilds.org>2010-10-21 00:05:41 +0100
commit44930dbae692fd26ce6c4e4c7eebdf832437bb1c (patch)
treee294a5881dc2942d67dd0a4a8c9269371ac49221 /system/glyptodon/doinst.sh
parentd6c310f4a84f3cefcb1e0ae0c2898c9da6c71b11 (diff)
downloadslackbuilds-44930dbae692fd26ce6c4e4c7eebdf832437bb1c.tar.gz
slackbuilds-44930dbae692fd26ce6c4e4c7eebdf832437bb1c.tar.xz
system/glyptodon: Added. (file-system analyzer).
Signed-off-by: Michiel van Wessem <michiel@slackbuilds.org>
Diffstat (limited to 'system/glyptodon/doinst.sh')
-rw-r--r--system/glyptodon/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/glyptodon/doinst.sh b/system/glyptodon/doinst.sh
new file mode 100644
index 0000000000..4347dd34a2
--- /dev/null
+++ b/system/glyptodon/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/cron.daily/glyptodon.new
+config etc/logrotate.d/glyptodon.new