From 44930dbae692fd26ce6c4e4c7eebdf832437bb1c Mon Sep 17 00:00:00 2001 From: Menno Duursma Date: Thu, 21 Oct 2010 00:05:41 +0100 Subject: system/glyptodon: Added. (file-system analyzer). Signed-off-by: Michiel van Wessem --- system/glyptodon/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 system/glyptodon/doinst.sh (limited to 'system/glyptodon/doinst.sh') 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 -- cgit v1.2.3