summaryrefslogtreecommitdiffstats
path: root/network/mod_chroot
diff options
context:
space:
mode:
author dsomero2011-03-23 23:18:09 +0100
committer Robby Workman2011-03-25 01:23:15 +0100
commit279057af5c4a2a47a4f1beaed06f9f348256062a (patch)
tree4ac62a9a278daf504b3090f30ca90777d9479d80 /network/mod_chroot
parent24a857c6cc4902982b68f70ba2c360c1d83d7061 (diff)
downloadslackbuilds-279057af5c4a2a47a4f1beaed06f9f348256062a.tar.gz
network/mod_chroot: Handle .new files correctly.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/mod_chroot')
-rw-r--r--network/mod_chroot/doinst.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/network/mod_chroot/doinst.sh b/network/mod_chroot/doinst.sh
index 19f5d6fd25..3183a8b24c 100644
--- a/network/mod_chroot/doinst.sh
+++ b/network/mod_chroot/doinst.sh
@@ -11,5 +11,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/httpd/mod_chroot.conf.new
+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/httpd/extra/mod_evasive.conf.new