From 9a981fcfe5780b39a066d4aad73fdb7bc38d3a5a Mon Sep 17 00:00:00 2001 From: Niels Horn Date: Thu, 13 May 2010 00:59:55 +0200 Subject: network/cacti: Added to 13.0 repository --- network/cacti/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 network/cacti/doinst.sh (limited to 'network/cacti/doinst.sh') diff --git a/network/cacti/doinst.sh b/network/cacti/doinst.sh new file mode 100644 index 0000000000..adb1b10ae8 --- /dev/null +++ b/network/cacti/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/cacti/config.php.new + -- cgit v1.2.3