From c93b1b4062775db0c364e9b9bb10b05ac7605c57 Mon Sep 17 00:00:00 2001 From: dsomero Date: Wed, 23 Mar 2011 18:19:49 -0400 Subject: network/mod_wsgi: Handle .new files correctly. Signed-off-by: dsomero --- network/mod_wsgi/doinst.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'network/mod_wsgi') diff --git a/network/mod_wsgi/doinst.sh b/network/mod_wsgi/doinst.sh index 7deb2518db..9650048d97 100644 --- a/network/mod_wsgi/doinst.sh +++ b/network/mod_wsgi/doinst.sh @@ -11,5 +11,16 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -config etc/httpd/mod_wsgi.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_wsgi.conf.new -- cgit v1.2.3