-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apache2: fix overwriting of .conf files. Take 2
use apache2.sysconfdir in post-activate phase
1 parent
6bcf8b3
commit d5d250b
Showing
1 changed file
with
7 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,10 @@ post-destroot { | |
|
||
move ${destroot}${apache2.sysconfdir}/httpd.conf \ | ||
${destroot}${apache2.sysconfdir}/httpd.conf.orig | ||
foreach f [glob -tails -directory ${destroot}${apache2.sysconfdir}/extra/ *] { | ||
move ${destroot}${apache2.sysconfdir}/extra/${f} \ | ||
${destroot}${apache2.sysconfdir}/extra/${f}.orig | ||
} | ||
|
||
xinstall -m 755 -d ${destroot}${apache2.datadir} | ||
xinstall -m 755 -d ${destroot}${apache2.runtimedir} | ||
|
@@ -125,26 +129,13 @@ pre-activate { | |
} | ||
} | ||
} | ||
|
||
# back up configuration files | ||
set systemTime [clock seconds] | ||
set date_str [clock format ${systemTime} -format {%Y%m%d}] | ||
copy ${apache2.sysconfdir}/httpd.conf ${apache2.sysconfdir}/httpd.conf.${date_str} | ||
foreach f "httpd-autoindex.conf httpd-dav.conf httpd-default.conf \ | ||
httpd-fcgid.conf httpd-info.conf httpd-languages.conf \ | ||
httpd-manual.conf httpd-mpm.conf httpd-multilang-errordoc.conf \ | ||
httpd-ssl.conf httpd-userdir.conf httpd-vhosts.conf \ | ||
proxy-html.conf" { | ||
copy ${apache2.sysconfdir}/extra/${f} ${apache2.sysconfdir}/extra/${f}.${date_str} | ||
} | ||
} | ||
|
||
post-activate { | ||
set confDir ${prefix}/etc/${name} | ||
if {![file exists ${confDir}/httpd.conf]} { | ||
file copy ${confDir}/httpd.conf.orig ${confDir}/httpd.conf | ||
if {![file exists ${apache2.sysconfdir}/httpd.conf]} { | ||
file copy ${apache2.sysconfdir}/httpd.conf.orig ${confDir}/httpd.conf | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Schamschula
via email
Author
Contributor
|
||
reinplace "s|#LoadModule slotmem_shm_module|LoadModule slotmem_shm_module|g" \ | ||
${confDir}/httpd.conf | ||
${apache2.sysconfdir}/httpd.conf | ||
} | ||
|
||
# | ||
|
1 comment
on commit d5d250b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 62b65b6
@Schamschula: is it possible that you forgot to rename the second
{confDir}
variable on this line?Because we are getting this error while trying to install apache2:
Thanks!