summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Herbert <stuart@gentoo.org>2003-08-04 01:01:56 +0000
committerStuart Herbert <stuart@gentoo.org>2003-08-04 01:01:56 +0000
commite9df0d2f639ed4b49b0e6e5bd080270e8a83473d (patch)
tree6f5d8c7684ab8fea513236f6cf24493722444d48 /eclass/webapp-apache.eclass
parentRevision bump to pick up new patch for cjk users. Putting right into stable ... (diff)
downloadgentoo-2-e9df0d2f639ed4b49b0e6e5bd080270e8a83473d.tar.gz
gentoo-2-e9df0d2f639ed4b49b0e6e5bd080270e8a83473d.tar.bz2
gentoo-2-e9df0d2f639ed4b49b0e6e5bd080270e8a83473d.zip
Attempted fix #2 for non-apache problem
Diffstat (limited to 'eclass/webapp-apache.eclass')
-rw-r--r--eclass/webapp-apache.eclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/eclass/webapp-apache.eclass b/eclass/webapp-apache.eclass
index b4342053457b..728fd211f70a 100644
--- a/eclass/webapp-apache.eclass
+++ b/eclass/webapp-apache.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/webapp-apache.eclass,v 1.3 2003/08/04 00:35:30 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/webapp-apache.eclass,v 1.4 2003/08/04 01:01:56 stuart Exp $
#
# Author: Stuart Herbert <stuart@gentoo.org>
#
@@ -23,9 +23,6 @@ EXPORT_FUNCTIONS pkg_preinst
function webapp-apache-detect ()
{
- local domsg=
- [ -n "$1" ] && domsg=1
-
APACHEVER=
has_version '=net-www/apache-1*' && APACHEVER=1
has_version '=net-www/apache-2*' && use apache2 && APACHEVER=2
@@ -33,8 +30,7 @@ function webapp-apache-detect ()
if [ "${APACHEVER}+" = "+" ]; then
# no apache version detected
- eerror "I can't find a copy of Apache on your machine"
- die 1
+ return 1
fi
APACHECONF="/etc/apache${APACHEVER}/conf/apache${APACHEVER}.conf"
@@ -43,17 +39,12 @@ function webapp-apache-detect ()
# run the function, so we know which version of apache we are using
-function webapp-apache_pkg_preinst () {
- webapp-apache-detect
+function webapp-detect () {
+ webapp-apache-detect || return 1
webapp-determine-installowner
webapp-determine-htdocsdir
}
-function webapp_pkg_preinst ()
-{
- webapp-apache_pkg_preinst
-}
-
function webapp-determine-htdocsdir ()
{
webapp-determine-installowner
@@ -71,3 +62,12 @@ function webapp-determine-installowner ()
HTTPD_GROUP="apache"
}
+function webapp-pkg_setup ()
+{
+ if [ "$1" == "1" ]; then
+ msg="I couldn't find an installation of Apache"
+ eerror "${msg}"
+ die "${msg}"
+ fi
+}
+