- 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)
This commit is contained in:
Sam Lawrance 2005-09-09 04:44:38 +00:00
parent a9bcb9ec32
commit 5e8b63668f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=142261
4 changed files with 37 additions and 24 deletions

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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