summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorSam Lawrance <lawrance@FreeBSD.org>2005-09-09 04:44:38 +0000
committerSam Lawrance <lawrance@FreeBSD.org>2005-09-09 04:44:38 +0000
commit5e8b63668ff6110cf3fe529ff6d53cef0d00aeee (patch)
treea3b31ec54900c9fc963cff58e0d4e62f8faed2fd /www
parent- unbreak fetch (diff)
- Fix post-install configuration so the port and package have the same
behaviour. This change only affects a non-default option, so bumping portrevision would have no effect. - Change some wording in pkg-message. PR: ports/84595 Submitted by: Aldert Nooitgedagt <aldert@nooitgedagt.net> (maintainer)
Notes
Notes: svn path=/head/; revision=142261
Diffstat (limited to 'www')
-rw-r--r--www/openacs/Makefile16
-rw-r--r--www/openacs/files/pkg-deinstall.in2
-rw-r--r--www/openacs/files/pkg-install.in26
-rw-r--r--www/openacs/files/pkg-message.in17
4 files changed, 37 insertions, 24 deletions
diff --git a/www/openacs/Makefile b/www/openacs/Makefile
index 65ca038a59d7..65b3155306f0 100644
--- a/www/openacs/Makefile
+++ b/www/openacs/Makefile
@@ -32,11 +32,12 @@ PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
.if defined(WITH_POSTCONFIG)
-POSTCONFIG= ${WRKDIR}/post-config
+POSTCONFIG= true
+PKGNAMESUFFIX= -withconfig
.endif
SUB_FILES= pkg-install pkg-message pkg-deinstall post-config
-SUB_LIST+= RCCONF=${RCCONF} \
+SUB_LIST+= RCCONF=${RCCONF} POSTCONFIG=${POSTCONFIG} \
OPENACSBASE=${OPENACSBASE} OPENACS_GROUP=${OPENACS_GROUP} \
OPENACS_USER=${OPENACS_USER} DB=${DB} PGDATA=${PGDATA} \
PG_USER=${PG_USER} PGBASE=${PGBASE} \
@@ -82,14 +83,10 @@ do-install:
@${MKDIR} ${EXAMPLESDIR}
@${MKDIR} ${OPENACSBASE}
@${MKDIR} ${VIRTUALBASE}
- @ ${MKDIR} ${DTSERVICEBASE}
+ @${MKDIR} ${DTSERVICEBASE}
@${ECHO_CMD} "Installing files"
- @if [ ! -d ${OPENACSBASE}/${OPENACS_USER} ] ; then \
- ${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER}; else \
- ${RM} -Rf ${OPENACSBASE}/${OPENACS_USER}.old && \
- ${MV} ${OPENACSBASE}/${OPENACS_USER} ${OPENACSBASE}/${OPENACS_USER}.old && \
- ${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER}; fi
+ @${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER}
@${TEST} -e ${VIRTUALBASE}/aolserver || ${LN} -s ${OPENACSBASE} ${VIRTUALBASE}/aolserver
@${TEST} -L ${VIRTUALBASE}/aolserver || ${ECHO_MSG} "${VIRTUALBASE}/aolserver is no symbolic link"
@@ -132,9 +129,6 @@ post-install:
@${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST}
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.if defined(WITH_POSTCONFIG)
- @${SH} ${POSTCONFIG} ${PKGNAME} POST-INSTALL
-.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/www/openacs/files/pkg-deinstall.in b/www/openacs/files/pkg-deinstall.in
index b030721b3965..cbc6efe0bf08 100644
--- a/www/openacs/files/pkg-deinstall.in
+++ b/www/openacs/files/pkg-deinstall.in
@@ -17,7 +17,7 @@ POST-DEINSTALL)
kill $pid
fi
echo " If no other openACS/.LRN instance needs it, you may want to "
- echo " delete %%AOLSERVERBASE%% and %%VIRTUALBASE%% manually, "
+ echo " delete %%VIRTUALBASE%%/aolserver and %%VIRTUALBASE%% manually, "
echo " and possibly the %%OPENACS_USER%% users and database. "
;;
esac
diff --git a/www/openacs/files/pkg-install.in b/www/openacs/files/pkg-install.in
index bcf4215c5492..072a25dfd1b6 100644
--- a/www/openacs/files/pkg-install.in
+++ b/www/openacs/files/pkg-install.in
@@ -14,6 +14,7 @@ PGBASE=%%PGBASE%%
DTSERVICEBASE=%%DTSERVICEBASE%%
AOLSERVERBASE=%%AOLSERVERBASE%%
VIRTUALBASE=%%VIRTUALBASE%%
+POSTCONFIG=%%POSTCONFIG%%
pre-install() { echo "
@@ -33,13 +34,14 @@ pre-install() { echo "
http://openacs.org/doc/current/upgrade.html
===========================================
+ To allow post-install configurations, use:
make install WITH_POSTCONFIG=yes
- to allow post-install configurations
- Or run afterwards:
- sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL
+ Or after installation has completed, do:
+ sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL
- Advice: stop Aolserver and Postgresql
+ Advice:
+ stop a running Aolserver and/or Postgresql
before post-install configuration starts.
Press ctrl-C *NOW* if you need to.
@@ -48,6 +50,14 @@ pre-install() { echo "
sleep 10
+if [ -d ${OPENACSBASE}/${OPENACS_USER} ] ; then
+ echo "WARNING: ${OPENACSBASE}/${OPENACS_USER} already exists !"
+ echo "It may be a valid tree or the result of an aborted previous install"
+ echo "TO CONTINUE: Move it, Delete it or do:"
+ echo " make install OPENACS_USER=ChooseName < WITH_POSTCONFIG=yes >"
+ echo " "
+ exit 1 ; fi
+
for DIRS in /usr/share/skel/dot
do
if egrep 'OPENACS-entries in .profile' ${DIRS}.profile >/dev/null 2>&1; then
@@ -103,6 +113,14 @@ post-install() {
chown -R ${OPENACS_USER}:${OPENACS_GROUP} ${OPENACSBASE}/${OPENACS_USER}
chown root:${OPENACS_GROUP} ${EXAMPLESDIR}/nsd-postgres ${EXAMPLESDIR}/nsd-oracle
+if test "${POSTCONFIG}" = "true" ; then
+ echo "Performing post-config changes"
+ sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL
+else
+ echo "No post-config changes performed"
+ echo "Run sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL later"
+fi
+
}
case $2 in
diff --git a/www/openacs/files/pkg-message.in b/www/openacs/files/pkg-message.in
index 8f57f07cc39f..f1a5a2a092bf 100644
--- a/www/openacs/files/pkg-message.in
+++ b/www/openacs/files/pkg-message.in
@@ -2,10 +2,11 @@
Congratulations! You have just installed OpenACS/.LRN
-If you didn't make install WITH_POSTCONFIG=yes
-to allow post-install configurations or run now:
-sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL
-Make sure you stop Aolserver and Postgresql
+If you didn't do make install WITH_POSTCONFIG=yes,
+inspect post-config.sh now and/or run:
+sh %%EXAMPLESDIR%%/post-config.sh XX POST-INSTALL
+If you can, stop Aolserver and Postgresql first
+(killall -9 nsd ; %%PREFIX%%/etc/rc.d/010.pgsql.sh stop)
before post-install configuration starts.
Then use your browser to view the welcome page (http://<your-ip>:8000)
@@ -43,17 +44,17 @@ twice!
If you want to remove openacs, type "make deinstall" or use pkg_delete
(pkg_info).
-However, users and database are not removed. At (re)install an existing
-datadirectory with the same name is moved to <name>.old
+However, users and database are not removed.
We use bash as shell in openACS. We didn't change the shells of
current users like root and pgsql, yet. If you want, do:
chsh -s %%LOCALBASE%%/bin/bash USERNAME
and change its profile by copying the openACS entries from
/usr/share/skel/dot.profile to ~/.profile.
-Than login/out or type ". .profile".
+Then login/out or type ". .profile".
-Remember: THIS MESSAGE is in PORTSDIR/www/openacs/pkg-message.
+Remember: THIS MESSAGE is in PORTSDIR/www/openacs/
+files/pkg-message.in or work/pkg-message
-Aldert
aldert@nooitgedagt.net