Author: bmahe
Date: Wed Oct 26 22:41:07 2011
New Revision: 1189512

URL: http://svn.apache.org/viewvc?rev=1189512&view=rev
Log:
BIGTOP-178. All of Flume wrapper scripts and init.d scripts need to start 
include find-java code from bigtop-utils

Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/service-init.d.tpl
    incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d
    incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse
    incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec

Modified: 
incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh?rev=1189512&r1=1189511&r2=1189512&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh 
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh 
Wed Oct 26 22:41:07 2011
@@ -121,6 +121,13 @@ mkdir -p `dirname $wrapper`
 cat > $wrapper <<EOF
 #!/bin/sh
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 exec /usr/lib/flume/bin/flume "\$@"
 EOF
 chmod 755 $wrapper

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control?rev=1189512&r1=1189511&r2=1189512&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control Wed Oct 26 
22:41:07 2011
@@ -23,7 +23,7 @@ Homepage: http://www.cloudera.com
 
 Package: flume
 Architecture: all
-Depends: hadoop-zookeeper (>= 3.3.1), adduser, hadoop
+Depends: hadoop-zookeeper (>= 3.3.1), adduser, hadoop, bigtop-utils
 Description: reliable, scalable, and manageable distributed data collection 
application
  Flume is a reliable, scalable, and manageable distributed data collection
  application for collecting data such as logs and delivering it to data stores

Modified: 
incubator/bigtop/trunk/bigtop-packages/src/deb/flume/service-init.d.tpl
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/flume/service-init.d.tpl?rev=1189512&r1=1189511&r2=1189512&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/flume/service-init.d.tpl 
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/flume/service-init.d.tpl Wed 
Oct 26 22:41:07 2011
@@ -27,6 +27,12 @@
 #
 # description: Flume @FLUME_DAEMON@
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
 
 export FLUME_HOME=/usr/lib/flume
 export FLUME_LOG_DIR=/var/log/flume

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d?rev=1189512&r1=1189511&r2=1189512&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d 
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d Wed Oct 
26 22:41:07 2011
@@ -30,6 +30,13 @@
 
 source /etc/rc.d/init.d/functions
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 desc="Flume @FLUME_DAEMON@ daemon"
 
 

Modified: 
incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse?rev=1189512&r1=1189511&r2=1189512&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse 
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse 
Wed Oct 26 22:41:07 2011
@@ -33,6 +33,13 @@
 
 source /lib/lsb/init-functions
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 STATUS_RUNNING=0
 STATUS_DEAD=1
 STATUS_DEAD_AND_LOCK=2

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec?rev=1189512&r1=1189511&r2=1189512&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec 
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec Wed 
Oct 26 22:41:07 2011
@@ -65,6 +65,7 @@ Source2: install_%{name}.sh
 Source3: init.d
 Source4: init.d.suse
 Requires: coreutils, /usr/sbin/useradd, hadoop-zookeeper >= 3.3.1, hadoop >= 
0.20.2
+Requires: bigtop-utils
 BuildRequires: ant xml-commons xml-commons-apis
 
 %if  0%{?mgaversion}


Reply via email to