Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2001 19:35:54 +0200 (CEST)
From:      ernst@jollem.com
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        java@freebsd.org
Subject:   ports/27748: Update port: java/orion (1.4.5_4 -> 1.4.5_5)
Message-ID:  <200105291735.f4THZsf02716@heinz.jollem.com>

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

>Number:         27748
>Category:       ports
>Synopsis:       Update port: java/orion (1.4.5_4 -> 1.4.5_5)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 29 10:40: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:
Changes:
Now installing a man page for 'orionctl'.
Correctly stopping Orion and removing the PID file on deinstall.
Verbose install (removed the @-signs).
Changes the exit codes in the script (and documented them in the man page)
Extended the documentation in pkg-descr.
>How-To-Repeat:
N/A
>Fix:

diff -ruN --exclude=CVS --exclude=work /usr/ports/java/orion/Makefile /home/ernst/freebsd-ports/java/orion/Makefile
--- /usr/ports/java/orion/Makefile	Tue May 29 16:29:40 2001
+++ /home/ernst/freebsd-ports/java/orion/Makefile	Tue May 29 19:29:34 2001
@@ -7,7 +7,7 @@
 
 PORTNAME=	orion
 PORTVERSION=	1.4.5
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	java www
 MASTER_SITES=	ftp://ftp.sunet.se/pub/database/utils/orionserver/ \
 		${MASTER_SITE_LOCAL} \
@@ -36,22 +36,27 @@
 .include <bsd.port.pre.mk>
 
 do-install:
-	@${MKDIR} ${ORION_HOME}
-	@${CP} -R ${WRKSRC}/* ${ORION_HOME}
-	@${CHMOD} 755 `find ${ORION_HOME} -type d`
-	@${CAT} ${FILESDIR}/${ORIONCTL_NAME} \
+	${MKDIR} ${ORION_HOME}
+	${CP} -R ${WRKSRC}/* ${ORION_HOME}
+	${CHMOD} 755 `find ${ORION_HOME} -type d`
+	${CAT} ${FILESDIR}/${ORIONCTL_NAME} \
 	| ${SED} "/%%PORTNAME%%/s//${PORTNAME}/" \
 	| ${SED} "/%%PORTVERSION%%/s//${PORTVERSION}/" \
 	| ${SED} "/%%ORION_HOME%%/s//${ORION_HOME:S/\//\\\//g}/" \
 	| ${SED} "/%%RC_SCRIPT_NAME%%/s//${PORTNAME}.sh/" \
 	| ${SED} "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/" \
 	> ${ORIONCTL_DEST}
-	@${CHMOD} 755 ${ORIONCTL_DEST}
-	@${LN} -sf ${ORIONCTL_DEST} ${RC_SCRIPT}
-	@${MKDIR} ${ORION_HOME}/application-deployments
-	@${LN} -sf ${JAVA_HOME}/jre/tools.jar ${ORION_HOME}/tools.jar
+	${CAT} ${FILESDIR}/${ORIONCTL_NAME}.1 \
+	| ${SED} "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/" \
+	> ${WRKDIR}/${ORIONCTL_NAME}.1
+	${CHMOD} 755 ${ORIONCTL_DEST}
+	${LN} -sf ${ORIONCTL_DEST} ${RC_SCRIPT}
+	${MKDIR} ${ORION_HOME}/application-deployments
+	${LN} -sf ${JAVA_HOME}/lib/tools.jar ${ORION_HOME}/tools.jar
+	${INSTALL_MAN} ${WRKDIR}/orionctl.1 ${MANPREFIX}/man/man1
 
 post-install:
-	@echo "${PORTTITLE} ${PORTVERSION} has been installed in ${ORION_HOME}."
+	@${ECHO} "${PORTTITLE} ${PORTVERSION} has been installed in ${ORION_HOME}."
+	@${ECHO} "Use 'man orionctl' for information about starting and stopping Orion."
 
 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS --exclude=work /usr/ports/java/orion/files/orionctl /home/ernst/freebsd-ports/java/orion/files/orionctl
--- /usr/ports/java/orion/files/orionctl	Tue May 29 16:29:40 2001
+++ /home/ernst/freebsd-ports/java/orion/files/orionctl	Mon May 28 11:18:49 2001
@@ -30,9 +30,8 @@
 			if [ "${AS_RC_SCRIPT}" = "yes" ]; then
 				echo ""
 			fi
-			echo "${NAME}: ERROR: Orion has already been started."
 			echo "${NAME}: ERROR: Found Orion PID file at ${PID_FILE}. Orion is probably already running."
-			exit 64
+			exit 1
 		fi
 
 		# Make sure the Orion directory does exist
@@ -41,7 +40,7 @@
 				echo ""
 			fi
 			echo "${NAME}: ERROR: Unable to find Orion home directory at ${ORION_HOME}."
-			exit 64
+			exit 2
 		fi
 
 		# Make sure the Orion JAR file exists
@@ -50,7 +49,7 @@
 				echo ""
 			fi
 			echo "${NAME}: ERROR: Unable to find Orion JAR file at ${JAR_FILE}."
-			exit 64
+			exit 3
 		fi
 
 		# Make sure the Java VM can be found
@@ -59,7 +58,7 @@
 				echo ""
 			fi
 			echo "${NAME}: ERROR: Unable to find Java VM at ${JAVA_HOME}."
-			exit 64
+			exit 4
 		fi
 
 		# Create the process ID file
@@ -83,14 +82,14 @@
 			# ...otherwise complain
 			else
 				echo "${NAME}: ERROR: Unable to find Orion PID file at ${PID_FILE}. Orion is probably not running."
-				exit 64
+				exit 16
 			fi
 		else
 			if [ "${AS_RC_SCRIPT}" = "yes" ]; then
 				echo -n " ${NAME}"
 			fi
 			/bin/kill `cat ${PID_FILE}`
-			rm ${PID_FILE}
+			rm -f ${PID_FILE}
 		fi
 
 		;;
diff -ruN --exclude=CVS --exclude=work /usr/ports/java/orion/files/orionctl.1 /home/ernst/freebsd-ports/java/orion/files/orionctl.1
--- /usr/ports/java/orion/files/orionctl.1	Thu Jan  1 01:00:00 1970
+++ /home/ernst/freebsd-ports/java/orion/files/orionctl.1	Mon May 28 10:00:07 2001
@@ -0,0 +1,96 @@
+.Dd May 26, 2001
+.Dt ORIONCTL 1
+.Os FreeBSD
+.Sh NAME
+.Nm orionctl
+.Nd Orion server control interface
+.Sh SYNOPSIS
+.Nm
+.Op Ar start | Ar stop
+.Sh DESCRIPTION
+The
+.Nm
+shell script provides an interface to the Orion application server.
+.Pp
+This script has 2 modes of operation, One is
+.Em shell script mode
+and the other is
+.Em rc script mode .
+If run as
+.Nm
+shell script mode is used, otherwise rc script mode is used. Shell script mode
+assumes that the script is used as a normal shell script, while rc script mode
+assumes the script is used to start or stop Orion at boot time.
+.Pp
+The script expects exactly one argument, either
+.Ar start
+or
+.Ar stop .
+If more than one argument is given, then all arguments but the first are
+ignored.
+.Bl -tag -width indent
+.It Ar start
+Start Orion, if it is not already running. The ID of the started process will
+be saved in a PID file.
+.It Ar stop
+Stop Orion, if it is actually running. The process with the ID stored in
+the PID file will be killed.
+.El
+.Sh ERRORS
+The following error conditions are detected. They will be checked in the
+specified order. In every case where an error message is printed it will be
+prepended by the name of the script
+.Em ( basename $0 ) .
+.Pp
+If no argument is passed, or if an argument other than
+.Ar start
+or
+.Ar stop
+is passed as the first argument, then a simple help message is printed and the
+script is exited with error code 64.
+.Pp
+In 
+.Em rc script mode
+a newline will be printed before any error message.
+.Pp
+When using the argument
+.Ar start
+the following errors conditions can be triggered:
+.Bl -tag -width indent
+.It Em The Orion PID file already exists.
+Orion is probably already running. Prints an error message and exits the
+script with error code 1.
+.It Em Orion home directory cannot be found
+Prints an error message and exits the script with error code 2.
+.It Em Orion JAR file cannot be found
+Prints an error message and exits the script with error code 3.
+.It Em Java VM cannot be found
+Prints an error message and exits the script with error code 4.
+.El
+.Pp
+When using the argument
+.Ar stop
+the following error condition can be triggered:
+.Bl -tag -width indent
+.It Em The Orion PID file cannot be found
+Orion is probably not running. Prints an error message and exits the script
+with error code 16.
+.El
+.Sh FILES
+.Bl -tag -width -indent
+.It Pa /var/run/orion.pid
+The Orion PID file that is used to store the process ID of the currently
+running Orion process in. It is deleted as soon as Orion is stopped and
+recreated when Orion is started. It should never be writable for anyone but
+.Em root ,
+.It Pa %%PREFIX%%/etc/rc.d/orion.sh
+A symlink to the
+.Nm
+script. This causes Orion to be started at boot time. When called from this
+location the
+.Nm
+script will use
+.Em rc script mode .
+.El
+.Sh AUTHORS
+.An Ernst de Haan Aq ernst@jollem.com
diff -ruN --exclude=CVS --exclude=work /usr/ports/java/orion/pkg-deinstall /home/ernst/freebsd-ports/java/orion/pkg-deinstall
--- /usr/ports/java/orion/pkg-deinstall	Thu Jan  1 01:00:00 1970
+++ /home/ernst/freebsd-ports/java/orion/pkg-deinstall	Mon May 28 11:22:20 2001
@@ -0,0 +1,8 @@
+#!/bin/sh
+PID_FILE=/var/run/orion.pid
+if [ -e ${PID_FILE} ]; then
+	echo -n "Orion is still running."
+	/bin/kill `cat ${PID_FILE}`
+	rm -f ${PID_FILE}
+	echo " Stopped."
+fi
diff -ruN --exclude=CVS --exclude=work /usr/ports/java/orion/pkg-descr /home/ernst/freebsd-ports/java/orion/pkg-descr
--- /usr/ports/java/orion/pkg-descr	Thu May 17 15:42:08 2001
+++ /home/ernst/freebsd-ports/java/orion/pkg-descr	Sat May 26 16:15:41 2001
@@ -7,4 +7,10 @@
 use. You need to purchase a license from http://www.orionserver.com/
 if you would like to use this server commercially.
 
+This port will install an 'orionctl' script in ${PREFIX}/bin that can be used
+to start and stop the server. A man page for this script is installed.
+
+A script in ${PREFIX}/etc/rc.d/orion.sh typically causes Orion to be started
+at boot time. This script is in fact a symlink to the orionctl script.
+
 WWW: http://www.orionserver.com/
>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?200105291735.f4THZsf02716>