Bugzilla – Attachment 28215 Details for
Bug 11404
add out-of-the-box support for Apache 2.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11404: only ask user if there are instances needing upgrading
Bug-11404-only-ask-user-if-there-are-instances-nee.patch (text/plain), 2.57 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-05-13 15:05:42 UTC
(
hide
)
Description:
Bug 11404: only ask user if there are instances needing upgrading
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-05-13 15:05:42 UTC
Size:
2.57 KB
patch
obsolete
>From af467dca22b41fbd286b67ae9173a823668f22a6 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Tue, 13 May 2014 13:39:04 +1200 >Subject: [PATCH] Bug 11404: only ask user if there are instances needing > upgrading > >There's no point asking the user if they want their Apache Koha >configuration updated if there's no configuration needing updated. > >This also fixes a case where the updating would have failed when running >on Apache 2.4. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >I agree with adding that checks, and the conditions rewrite seems cleaner >than my first approach. So, I sign it. >--- > debian/koha-common.config | 16 +++++++++++++++- > debian/koha-common.postinst | 5 +++-- > 2 files changed, 18 insertions(+), 3 deletions(-) > >diff --git a/debian/koha-common.config b/debian/koha-common.config >index 0504da2..87defe2 100755 >--- a/debian/koha-common.config >+++ b/debian/koha-common.config >@@ -42,7 +42,21 @@ fi > > db_input medium koha-common/automatically-update-translations || true > >-db_input high koha-common/rename-apache-vhost-files || true >+# Determine if we should ask the user about upgrading - there's no point >+# if this is a fresh install anyway. >+if [ -e /usr/sbin/koha-list ]; then >+ RENAME_APACHE_FILES="no" >+ for vhost in $(koha-list); do >+ if [ -f "/etc/apache2/sites-available/$vhost" ] && \ >+ [ ! -f "/etc/apache2/sites-available/$vhost.conf" ]; then >+ RENAME_APACHE_FILES="yes" >+ break # at least one, trigger renaming >+ fi >+ done >+ if [ "$RENAME_APACHE_FILES" = "yes" ]; then >+ db_input high koha-common/rename-apache-vhost-files || true >+ fi >+fi > > db_go || true > >diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst >index 1912659..5b6967f 100644 >--- a/debian/koha-common.postinst >+++ b/debian/koha-common.postinst >@@ -109,10 +109,11 @@ EOF > ENABLE_VHOST="yes" > if [ -f "/etc/apache2/sites-available/$site" ] && \ > [ ! -f "/etc/apache2/sites-available/$site.conf" ]; then >- if ! a2dissite $site > /dev/null 2>&1; then >- echo "Warning: problem disabling $site in Apache" >&2 >+ if [ ! -f "/etc/apache2/sites-enabled/$site" ]; then > ENABLE_VHOST="no" > fi >+ a2dissite $site > /dev/null 2>&1 || true >+ rm -f "/etc/apache2/sites-enabled/$site" > # Rename the vhost definition files > mv "/etc/apache2/sites-available/$site" \ > "/etc/apache2/sites-available/$site.conf" >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11404
:
23581
|
28163
|
28164
|
28165
|
28185
|
28186
|
28187
|
28188
|
28215
|
28370
|
28371
|
28372
|
28373