Author: bsnyder
Date: Thu May 29 11:39:29 2008
New Revision: 661431
URL: http://svn.apache.org/viewvc?rev=661431&view=rev
Log:
SMX4KNL-48 - ulimit error on MacOS X Leopard 10.5.
Modified:
servicemix/smx4/kernel/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
Modified:
servicemix/smx4/kernel/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
URL:
http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix?rev=661431&r1=661430&r2=661431&view=diff
==============================================================================
---
servicemix/smx4/kernel/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
(original)
+++
servicemix/smx4/kernel/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
Thu May 29 11:39:29 2008
@@ -88,19 +88,21 @@
# Increase the maximum file descriptors if we can
if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ]; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
- # use the system max
- MAX_FD="$MAX_FD_LIMIT"
+ if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
+ if [ $? -eq 0 ]; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
+ # use the system max
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+
+ ulimit -n $MAX_FD > /dev/null
+ # echo "ulimit -n" `ulimit -n`
+ if [ $? -ne 0 ]; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query system maximum file descriptor limit:
$MAX_FD_LIMIT"
fi
-
- ulimit -n $MAX_FD > /dev/null
- # echo "ulimit -n" `ulimit -n`
- if [ $? -ne 0 ]; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query system maximum file descriptor limit:
$MAX_FD_LIMIT"
fi
fi
}
@@ -118,11 +120,11 @@
locateBase() {
if [ "x$SERVICEMIX_BASE" != "x" ]; then
- if [ ! -d "$SERVICEMIX_BASE" ]; then
- die "SERVICEMIX_BASE is not valid: $SERVICEMIX_BASE"
- fi
- else
- SERVICEMIX_BASE=$SERVICEMIX_HOME
+ if [ ! -d "$SERVICEMIX_BASE" ]; then
+ die "SERVICEMIX_BASE is not valid: $SERVICEMIX_BASE"
+ fi
+ else
+ SERVICEMIX_BASE=$SERVICEMIX_HOME
fi
}