Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2001 15:47:50 +0200 (CEST)
From:      ernst@jollem.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/27501: Update port: java/orion
Message-ID:  <200105211347.f4LDlog07178@heinz.jollem.com>

next in thread | raw e-mail | index | archive | help

>Number:         27501
>Category:       ports
>Synopsis:       Update port: java/orion
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 21 06:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ernst de Haan
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
Jollem Information Technology
>Environment:
System: FreeBSD heinz.jollem.com 4.3-RELEASE FreeBSD 4.3-RELEASE #5: Mon May 14 16:08:56 CEST 2001 root@heinz.jollem.com:/usr/src/sys/compile/HEINZ i386
>Description:
The previous version of this port contains a bug in the orionctl script. I
didn't properly test it. This time I extensively tested it. It has also been
improved to detect more possible error conditions and exit gracefully in such
cases.
>How-To-Repeat:
	
>Fix:


diff -ruN --exclude=CVS /usr/ports/java/orion/Makefile /home/ernst/freebsd-ports/java/orion/Makefile
--- /usr/ports/java/orion/Makefile	Fri May 18 18:24:32 2001
+++ /home/ernst/freebsd-ports/java/orion/Makefile	Mon May 21 15:38:48 2001
@@ -7,13 +7,12 @@
 
 PORTNAME=	orion
 PORTVERSION=	1.4.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	java www
 MASTER_SITES=	ftp://ftp.sunet.se/pub/database/utils/orionserver/ \
 		http://www.jollem.com/ \
 		http://www.sebster.com/~elvis/
 DISTNAME=	${PORTNAME}${PORTVERSION}
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	ernst@jollem.com
 
@@ -24,7 +23,6 @@
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 ORION_DESTDIR=	${PREFIX}/${DISTNAME}
-ORION_LINKDIR=	${PREFIX}/${PORTNAME}
 PORTTITLE=	Orion Server
 ORIONCTL_NAME=	orionctl
 ORIONCTL_DEST=	${PREFIX}/bin/${ORIONCTL_NAME}
@@ -43,6 +41,7 @@
 	@${CP} ${FILESDIR}/${ORIONCTL_NAME}  ${ORIONCTL_DEST}
 	@${CHMOD} 755 ${ORIONCTL_DEST}
 	@${LN} -s ${ORIONCTL_DEST} ${RC_SCRIPT}
+	@${MKDIR} ${ORION_DESTDIR}/application-deployments
 
 post-install:
 	@echo "${PORTTITLE} ${PORTVERSION} has been installed in ${ORION_DESTDIR}."
diff -ruN --exclude=CVS /usr/ports/java/orion/files/orionctl /home/ernst/freebsd-ports/java/orion/files/orionctl
--- /usr/ports/java/orion/files/orionctl	Thu May 17 15:42:10 2001
+++ /home/ernst/freebsd-ports/java/orion/files/orionctl	Fri May 18 16:36:31 2001
@@ -4,23 +4,59 @@
 	LOCALBASE=/usr/local
 fi
 
-JAVA_HOME=${LOCALBASE}/linux-jdk1.2.2
-ORION_HOME=${LOCALBASE}/orion
+NAME=orion
+ORION_HOME=${LOCALBASE}/orion1.4.5
 LOG=${ORION_HOME}/log/orion.log
 PID_FILE=/var/run/orion.pid
+JAR_FILE=${ORION_HOME}/orion.jar
+
+if [ "${JAVA_HOME}a" = "a" ]; then
+	JAVA_HOME=${LOCALBASE}/linux-jdk1.3.0
+fi
+JAVA_CMD=${JAVA_HOME}/bin/java
+
+# TODO: Check if we are being run at boot time right now
+
 
 case "$1" in
 	start)
-		if [ -r ${ORION_HOME}/orion.jar ]; then
-			rm -rf ${PID_FILE}
-			touch ${PID_FILE}
-			chown root:wheel ${PID_FILE}
-			chmod 600 ${PID_FILE}
-			echo -n ' orion'
-			( cd ${ORION_HOME} && ${JAVA_HOME}/bin/java -jar orion.jar & echo $! > ${PID_FILE} ) > ${LOG} 2>&1
+		# Make sure the Orion directory does exist
+		if [ ! -d ${ORION_HOME} ]; then
+			echo ""
+			echo "${NAME}: ERROR: Unable to find Orion home directory at ${ORION_HOME}."
+			exit 64
 		fi
+
+		# Make sure the Orion JAR file exists
+		if [ ! -r ${JAR_FILE} ]; then
+			echo ""
+			echo "${NAME}: ERROR: Unable to find Orion JAR file at ${JAR_FILE}."
+			exit 64
+		fi
+
+		# Make sure the Java VM can be found
+		if [ ! -x ${JAVA_CMD} ]; then
+			echo ""
+			echo "${NAME}: ERROR: Unable to find Java VM at ${JAVA_HOME}."
+			exit 64
+		fi
+
+		# Create the process ID file
+		rm -rf ${PID_FILE}
+		touch ${PID_FILE}
+		chown root:wheel ${PID_FILE}
+		chmod 600 ${PID_FILE}
+
+		echo -n ' orion'
+		( cd ${ORION_HOME} && ${JAVA_CMD} -jar orion.jar & echo $! > ${PID_FILE} ) > ${LOG} 2>&1
 		;;
 	stop)
+		if [ ! -e ${PID_FILE} ]; then
+			echo ""
+			echo "${NAME}: ERROR: Unable to find Orion PID file at ${PID_FILE}."
+			exit 64
+		fi
+
 		/bin/kill `cat ${PID_FILE}`
 		echo -n ' orion'
 		;;
diff -ruN --exclude=CVS /usr/ports/java/orion/pkg-plist /home/ernst/freebsd-ports/java/orion/pkg-plist
--- /usr/ports/java/orion/pkg-plist	Thu May 17 15:42:08 2001
+++ /home/ernst/freebsd-ports/java/orion/pkg-plist	Mon May 21 15:29:45 2001
@@ -316,6 +316,7 @@
 orion1.4.5/orionconsole.jar
 orion1.4.5/orion.jar
 orion1.4.5/mail.jar
+@dirrm orion1.4.5/application-deployments
 @dirrm orion1.4.5/config/database-schemas
 @dirrm orion1.4.5/config
 @dirrm orion1.4.5/default-web-app/examples/cal
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105211347.f4LDlog07178>