aboutsummaryrefslogtreecommitdiffstats
path: root/www/tomcat41
diff options
context:
space:
mode:
authorznerd <znerd@FreeBSD.org>2002-05-09 06:00:04 +0800
committerznerd <znerd@FreeBSD.org>2002-05-09 06:00:04 +0800
commit6db8303623ed49f1f1a9979b207b7727f1440395 (patch)
tree5874e036010d7cdac57c55bf226856fa7ae5ebe6 /www/tomcat41
parentec866decb54814f187721397baef557bdd5477a5 (diff)
downloadfreebsd-ports-gnome-6db8303623ed49f1f1a9979b207b7727f1440395.tar.gz
freebsd-ports-gnome-6db8303623ed49f1f1a9979b207b7727f1440395.tar.zst
freebsd-ports-gnome-6db8303623ed49f1f1a9979b207b7727f1440395.zip
Changed daemonctl program to check if the JAR file exists before
trying to start the JVM. This is a serious usability improvement. Bumped PORTREVISION.
Diffstat (limited to 'www/tomcat41')
-rw-r--r--www/tomcat41/Makefile2
-rw-r--r--www/tomcat41/files/daemonctl.c12
2 files changed, 12 insertions, 2 deletions
diff --git a/www/tomcat41/Makefile b/www/tomcat41/Makefile
index ef5efb825a57..04457e0d8f66 100644
--- a/www/tomcat41/Makefile
+++ b/www/tomcat41/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jakarta-tomcat
PORTVERSION= 4.0.3
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= www java
MASTER_SITES= http://jakarta.apache.org/builds/jakarta-tomcat-${PORTVERSION:R}/release/v${PORTVERSION}/bin/ \
http://www.metaverse.nl/~ernst/ \
diff --git a/www/tomcat41/files/daemonctl.c b/www/tomcat41/files/daemonctl.c
index 6e9a6b25b4b7..5a3684a39d82 100644
--- a/www/tomcat41/files/daemonctl.c
+++ b/www/tomcat41/files/daemonctl.c
@@ -4,7 +4,7 @@
*
* Daemon control program.
*
- * $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.5 2002-04-08 21:50:22 znerd Exp $
+ * $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.6 2002-05-08 22:00:04 znerd Exp $
*/
#include <assert.h>
@@ -36,6 +36,7 @@
#define ERR_ALREADY_RUNNING 6
#define ERR_NOT_RUNNING 7
#define ERR_CHDIR_TO_APP_HOME 8
+#define ERR_ACCESS_JAR_FILE 17
#define ERR_STDOUT_LOGFILE_OPEN 9
#define ERR_STDERR_LOGFILE_OPEN 10
#define ERR_FORK_FAILED 11
@@ -370,6 +371,15 @@ void start(void) {
exit(ERR_CHDIR_TO_APP_HOME);
}
+ /* See if the JAR file exists */
+ result = access("%%APP_HOME%%/%%JAR_FILE%%", R_OK);
+ if (result < 0) {
+ printf(" [ FAILED ]\n");
+ fprintf(stderr, "%%CONTROL_SCRIPT_NAME%%: Unable to access JAR file %%APP_HOME%%/%%JAR_FILE%%: ");
+ perror(NULL);
+ exit(ERR_ACCESS_JAR_FILE);
+ }
+
/* Open the stdout log file */
stdoutLogFile = open("%%STDOUT_LOG%%", O_WRONLY);
if (stdoutLogFile < 0) {