diff --git a/apache2.changes b/apache2.changes index dced312..e94cf09 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 3 13:43:22 CEST 2007 - skh@suse.de + +- get_module_list: replace loadmodule.conf atomically [bnc #214863] + ------------------------------------------------------------------- Fri Aug 31 12:37:27 CEST 2007 - poeml@suse.de diff --git a/apache2.spec b/apache2.spec index 6e3bf7a..4e4986f 100644 --- a/apache2.spec +++ b/apache2.spec @@ -55,7 +55,7 @@ License: The Apache Software License Group: Productivity/Networking/Web/Servers %define realver 2.2.4 Version: 2.2.4 -Release: 59 +Release: 61 #Source0: http://www.apache.org/dist/httpd-%{version}.tar.bz2 Source0: http://httpd.apache.org/dev/dist/httpd-%{realver}.tar.bz2 Source10: SUSE-NOTICE @@ -1060,6 +1060,8 @@ if ! test -f /.buildenv; then fi %changelog +* Mon Sep 03 2007 - skh@suse.de +- get_module_list: replace loadmodule.conf atomically [bnc #214863] * Fri Aug 31 2007 - poeml@suse.de - replace httpd-2.2.3-AddDirectoryIndexCharset.patch with the upstream solution, httpd-2.2.4-mod_autoindex-charset-r570962.patch [#153557] diff --git a/get_module_list b/get_module_list index c234744..1b0a816 100644 --- a/get_module_list +++ b/get_module_list @@ -19,7 +19,13 @@ else fi #echo -n writing sysconfig.d/loadmodule.conf -exec 3>$sysconfdir/sysconfig.d/loadmodule.conf +TMPFILE=`/bin/mktemp /tmp/$pname.XXXXXXXXXXXX` +if [ -z "$TMPFILE" ]; then + echo >&2 Error: could not create temporary file for writing loadmodules.conf. + exit 1 +fi + +exec 3>$TMPFILE echo >&3 "# # Files in this directory are created at apache start time by /usr/sbin/rc$pname # Do not edit them! @@ -98,6 +104,8 @@ for i in ${APACHE_MODULES[*]}; do done echo >&3 -e "#\n" exec 3<&- +chmod 644 $TMPFILE +mv $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf #echo -n ". "