diff options
author | Menno E. Duursma <druiloor@zonnet.nl> | 2010-05-13 00:37:16 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 00:37:16 +0200 |
commit | 46e038ecd35e767749e11ad8362446cea38758ad (patch) | |
tree | f76c4290d914a27b8bfaccf4d31bccc40fc4d72f /network/mod_hosts_access/doinst.sh | |
parent | 8900f695e50fd4af41fc9cfbdbf821ee8a2b29ef (diff) | |
download | slackbuilds-46e038ecd35e767749e11ad8362446cea38758ad.tar.gz slackbuilds-46e038ecd35e767749e11ad8362446cea38758ad.tar.xz |
network/mod_hosts_access: Updated for version 1.1.0
Diffstat (limited to 'network/mod_hosts_access/doinst.sh')
-rw-r--r-- | network/mod_hosts_access/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/network/mod_hosts_access/doinst.sh b/network/mod_hosts_access/doinst.sh new file mode 100644 index 0000000000..d32f2a6362 --- /dev/null +++ b/network/mod_hosts_access/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/mod_hosts_access.conf.new + |