Updated Branches: refs/heads/trunk db8294932 -> f54764207
eliminate redundant classpath creation Patch by eevans; reviewed by Anton Winter for CASSANDRA-6101 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/723abe2f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/723abe2f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/723abe2f Branch: refs/heads/trunk Commit: 723abe2fc2cbdd89db552e6dd225efe1d4086ebe Parents: 31a9a2f Author: Eric Evans <eev...@apache.org> Authored: Thu Oct 3 09:40:39 2013 -0500 Committer: Eric Evans <eev...@apache.org> Committed: Thu Oct 3 09:42:03 2013 -0500 ---------------------------------------------------------------------- debian/cassandra.in.sh | 2 ++ debian/init | 23 ++++------------------- 2 files changed, 6 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/723abe2f/debian/cassandra.in.sh ---------------------------------------------------------------------- diff --git a/debian/cassandra.in.sh b/debian/cassandra.in.sh index f618895..13005e2 100644 --- a/debian/cassandra.in.sh +++ b/debian/cassandra.in.sh @@ -18,3 +18,5 @@ done for jar in /usr/share/cassandra/*.jar; do CLASSPATH=$CLASSPATH:$jar done + +CLASSPATH="$CLASSPATH:$EXTRA_CLASSPATH" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cassandra/blob/723abe2f/debian/init ---------------------------------------------------------------------- diff --git a/debian/init b/debian/init index ce929a1..17901e8 100644 --- a/debian/init +++ b/debian/init @@ -77,26 +77,9 @@ fi # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions +# If JNA is installed, add it to EXTRA_CLASSPATH # -# Function that returns the applications classpath -# -classpath() -{ - cp="$EXTRA_CLASSPATH" - for j in /usr/share/$NAME/lib/*.jar; do - [ "x$cp" = "x" ] && cp=$j || cp=$cp:$j - done - for j in /usr/share/$NAME/*.jar; do - [ "x$cp" = "x" ] && cp=$j || cp=$cp:$j - done - - # use JNA if installed in standard location - [ -r /usr/share/java/jna.jar ] && cp="$cp:/usr/share/java/jna.jar" - - # Include the conf directory for purposes of log4j-server.properties, and - # commons-daemon in support of the daemonization class. - printf "$cp:$CONFDIR:/usr/share/java/commons-daemon.jar" -} +EXTRA_CLASSPATH="/usr/share/java/jna.jar:$EXTRA_CLASSPATH" # # Function that returns 0 if process is running, or nonzero if not. @@ -136,6 +119,8 @@ do_start() [ -e `dirname "$PIDFILE"` ] || \ install -d -ocassandra -gcassandra -m750 `dirname $PIDFILE` + export EXTRA_CLASSPATH + start-stop-daemon -S -c cassandra -a /usr/sbin/cassandra -q -p "$PIDFILE" -t >/dev/null || return 1 start-stop-daemon -S -c cassandra -a /usr/sbin/cassandra -b -p "$PIDFILE" -- \